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