06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

add_ni Adds a network interface.<br />

#include <br />

long add_ni(<br />

struct ni_init *ni /* network interface */<br />

)<br />

Description<br />

Arguments<br />

This system call is used to dynamically add a network interface to the pNA+ network<br />

manager. The characteristics of the network interface are specified in the data<br />

structure pointed to by ni.<br />

This routine calls the network interface driver's NI_INIT routine for driver<br />

initialization.<br />

ni Points to an ni_init structure. The structure ni_init is defined in<br />

the file and has the following format:<br />

struct ni_init {<br />

int (*entry)(); /* address of NI entry point */<br />

int ipadd; /* IP address */<br />

int mtu; /* maximum transmission length */<br />

int hwalen; /* length of hardware address */<br />

int flags; /* interface flags */<br />

int subnetaddr; /* subnet mask */<br />

int dstipaddr; /* Dest. address in Point-to Point NI */<br />

int reserved[1]; /* reserved for future use */<br />

};<br />

This structure cannot be packed. The flags element can contain one<br />

or more of the following symbolic constants (defined in pna.h), using<br />

the syntax:<br />

IFF_BROADCAST | IFF_RAWMEM<br />

Symbolic Constant Description<br />

IFF_BROADCAST NI can broadcast.<br />

IFF_EXTLOOPBACK NI uses external loopback.<br />

IFF_INITDOWN NI must be initialized in DOWN state. Default<br />

is UP state.<br />

4-4 <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!