Next: , Previous: , Up: Embedding API   [Contents][Index]

5.2.15 Network interface functions

The network interface functions of the Serveez core API allow access to the network devices on your system. The system administrator can set up these devices to be bound to different Internet addresses and thereby split the network configuration into different domains. Thus, the system is able to separate the traffic of different networks. If set up correctly, Serveez can follow these rules.

Function: int svz_foreach_interface (svz_interface_do_t *func, void *closure)

Call func for each interface, passing additionally the second arg closure. If func returns a negative value, return immediately with that value (breaking out of the loop), otherwise, return 0.

Function: int svz_interface_add (size_t index, char *desc, int family, const void *bits, int detected)

Add a network interface to the current list of known interfaces. Drop duplicate entries. The given arguments index specifies the network interface index number, desc an interface desription, family an address-family (e.g., AF_INET), bits the address data in network-byte order, and the detected flag if the given network interface has been detected by Serveez itself or not.