D | ucon.c | 60 static int netlink_send(int s, struct cn_msg *msg) in netlink_send() argument 84 err = send(s, nlh, size, 0); in netlink_send() 113 int s; in main() local 124 while ((s = getopt(argc, argv, "hs")) != -1) { in main() 125 switch (s) { in main() 153 s = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_CONNECTOR); in main() 154 if (s == -1) { in main() 165 if (bind(s, (struct sockaddr *)&l_local, sizeof(struct sockaddr_nl)) == -1) { in main() 167 close(s); in main() 174 setsockopt(s, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, &on, sizeof(on)); in main() [all …]
|