• Home
  • Raw
  • Download

Lines Matching refs:addr

41   struct sockaddr_nl addr;  in netlink_init()  local
42 socklen_t slen = sizeof(addr); in netlink_init()
44 addr.nl_family = AF_NETLINK; in netlink_init()
45 addr.nl_pad = 0; in netlink_init()
46 addr.nl_pid = 0; /* autobind */ in netlink_init()
48 addr.nl_groups = RTMGRP_IPV4_ROUTE | RTMGRP_IPV6_ROUTE; in netlink_init()
50 addr.nl_groups = RTMGRP_IPV4_ROUTE; in netlink_init()
56 if (bind(daemon->netlinkfd, (struct sockaddr *)&addr, sizeof(addr)) == -1) in netlink_init()
58 addr.nl_groups = 0; in netlink_init()
59 if (errno != EPERM || bind(daemon->netlinkfd, (struct sockaddr *)&addr, sizeof(addr)) == -1) in netlink_init()
65 getsockname(daemon->netlinkfd, (struct sockaddr *)&addr, &slen) == 1) in netlink_init()
69 netlink_pid = addr.nl_pid; in netlink_init()
127 struct sockaddr_nl addr; in iface_enumerate() local
138 addr.nl_family = AF_NETLINK; in iface_enumerate()
139 addr.nl_pad = 0; in iface_enumerate()
140 addr.nl_groups = 0; in iface_enumerate()
141 addr.nl_pid = 0; /* address to kernel */ in iface_enumerate()
153 (struct sockaddr *)&addr, sizeof(addr))) == -1 && retry_send()); in iface_enumerate()
194 struct in_addr netmask, addr, broadcast; in iface_enumerate() local
197 addr.s_addr = 0; in iface_enumerate()
203 addr = *((struct in_addr *)(rta+1)); in iface_enumerate()
210 if (addr.s_addr && ipv4_callback) in iface_enumerate()
211 if (!((*ipv4_callback)(addr, ifa->ifa_index, netmask, broadcast, parm))) in iface_enumerate()
296 &daemon->srv_save->addr.sa, sa_len(&daemon->srv_save->addr)) == -1 && retry_send()); in nl_routechange()