06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ioctl pNA+ <strong>System</strong> <strong>Calls</strong><br />

struct mbstat {<br />

long mb_classes; /* Number of buffer classes */<br />

long mb_mblks; /* Number of mblks configured */<br />

long mb_free; /* Number of free mblks */<br />

long mb_wait; /* Number of times task waited for mblk */<br />

long mb_drops; /* Number of times mblks unavailable */<br />

};<br />

SIOCGDBSTAT Gets the statistics for buffers configured in the system. A<br />

pointer to the dbreq structure is passed as the arg parameter.<br />

The dbs element must point to a buffer that can<br />

hold at least size number of bytes. The buffer on return<br />

contains a sequence of dbstat structures each of which is<br />

filled in the statistics of the particular buffer size. It is recommended<br />

that the size of the dbs buffer be large enough<br />

to contain all the buffer types configured in the system.<br />

size is an input/output element that contains the size of<br />

a buffer on input. On output the pNA+ network manager<br />

returns the size of buffer used by the call. These structures<br />

are defined as follows in :<br />

struct dbreq {<br />

long size; /* Size of the buffer */<br />

struct dbstat *dbs; /* Pointer to the buffer*/<br />

};<br />

struct dbstat {<br />

long db_size; /* Size of buffer */<br />

long db_nbuffers; /* Number of buffers configured*/<br />

long db_free; /* Number of free buffers */<br />

long db_wait; /* No. of times tasks waited for buffer */<br />

long db_drops; /* No. of times buffer was unavailable */<br />

};<br />

ARP-Related Operations<br />

The following operations are available for accessing and modifying the ARP table:<br />

Operation Description<br />

SIOCSARP Sets an ARP entry.<br />

SIOCGARP Gets an ARP entry.<br />

SIOCDARP Deletes an ARP entry.<br />

For all ARP-related operations, arg must point to the following structure:<br />

4-26 <strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!