15.4. The Code File: ladProject.c
The ladProject.c file is the one we'll be modifying. Rather than describing the generated code and then making a second pass through it to add our modifications, we'll just step through it, making our changes as we go. We'll distinguish the code we add from what mib2c generated using bold text. Specifically, we need to make the following modifications to the generated skeleton code:
Include the header for libpq (the PostgreSQL library).
Provide a function to connect to RTA in the ladd daemon.
Provide functions to read and write RTA tables over the connection to the ladd daemon.
Provide code to read each scalar in the MIB.
Provide code to read each table object in the ladAlarmTable.
Provide a write function for each ...
Get Linux Appliance Design now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.