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:

  1. Include the header for libpq (the PostgreSQL library).

  2. Provide a function to connect to RTA in the ladd daemon.

  3. Provide functions to read and write RTA tables over the connection to the ladd daemon.

  4. Provide code to read each scalar in the MIB.

  5. Provide code to read each table object in the ladAlarmTable.

  6. 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.