4 #include <sys/socket.h>
9 #define AF_IPNS AF_NETBEUI
10 #define PF_IPNS AF_IPNS
12 #define IPN_BROADCAST 1
14 #define IPN_VDESWITCH 2
15 #define IPN_VDESWITCH_L3 3
18 struct sockaddr_un sun
={.sun_family
=AF_IPN
,.sun_path
="/tmp/sockipn"};
21 int s
=socket(AF_IPN
,SOCK_RAW
,IPN_BROADCAST
);
25 s
=socket(AF_IPNS
,SOCK_RAW
,IPN_BROADCAST
);
30 err
=connect(s
,(struct sockaddr
*)&sun
,sizeof(sun
));
33 while ((len
=read(s
,buf
,256)) > 0) {