Attach to a Virtual Packet Interface
#include <net/if_vp.h> vpid_t vp_attach( int sd, int type, pid_t inProxy );
vpack3r.lib, vpack3s.lib
The vp_attach() function is the first function called when a Virtual Packet Interface (VPI) is used. It calls the TCP/IP stack, obtains and initializes a spare VPI, and returns a unique virtual packet ID (vpid_t).
After successfully attaching to an interface, you can use ioctl() to set up your interface or your IP address.
A virtual packet ID, or -1 if an error occurs.
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |