s=socket(PF_NETLINK,SOCK_DGRAM,NETLINK_KOBJECT_UEVENT); if(s<0) return-1; setsockopt(s,SOL_SOCKET,SO_RCVBUFFORCE,&buf_sz,sizeof(buf_sz)); setsockopt(s,SOL_SOCKET,SO_PASSCRED,&on,sizeof(on)); if(bind(s,(structsockaddr*)&addr,sizeof(addr))<0){ close(s); return-1; } return...