search for: open_if

Displaying 1 result from an estimated 1 matches for "open_if".

Did you mean: open_in
2003 Feb 20
0
Netbios name service forwarding.
...if.h> #include <arpa/inet.h> #define NETBIOSPORT 137 typedef struct iface_struct { struct iface_struct *next; char *name; int fd; struct sockaddr_in me; struct sockaddr_in nmbd; struct sockaddr_in bcast; struct sockaddr_in addr_cache[0x10000]; } *iface; iface ifs; void open_if (char *name, int nb_port, int dm_port) { struct sockaddr_in me = { 0 }; iface i = (iface) malloc (sizeof (struct iface_struct)); int fd; int one = 1; int j; struct ifreq ifr = { 0 }; bzero (i, sizeof (struct iface_struct)); i->name = strdup (name); i->fd = socket (AF_INE...