Lines Matching refs:iface

204 	struct interface *iface = NULL;  in init_interface()  local
211 iface = xzalloc(sizeof(*iface)); in init_interface()
212 strlcpy(iface->name, ifname, sizeof(iface->name)); in init_interface()
213 iface->flags = ifr.ifr_flags; in init_interface()
216 iface->metric = 200 + if_nametoindex(iface->name); in init_interface()
217 if (getifssid(ifname, iface->ssid) != -1) { in init_interface()
218 iface->wireless = 1; in init_interface()
219 iface->metric += 100; in init_interface()
232 snprintf(iface->leasefile, sizeof(iface->leasefile), in init_interface()
235 iface->raw_fd = -1; in init_interface()
236 iface->udp_fd = -1; in init_interface()
237 iface->arp_fd = -1; in init_interface()
241 free(iface); in init_interface()
242 iface = NULL; in init_interface()
244 return iface; in init_interface()
248 free_interface(struct interface *iface) in free_interface() argument
250 if (!iface) in free_interface()
252 ipv6rs_free(iface); in free_interface()
253 if (iface->state) { in free_interface()
254 free_options(iface->state->options); in free_interface()
255 free(iface->state->old); in free_interface()
256 free(iface->state->new); in free_interface()
257 free(iface->state->offer); in free_interface()
258 free(iface->state); in free_interface()
260 free(iface->buffer); in free_interface()
261 free(iface->clientid); in free_interface()
262 free(iface); in free_interface()
266 carrier_status(struct interface *iface) in carrier_status() argument
278 strlcpy(ifr.ifr_name, iface->name, sizeof(ifr.ifr_name)); in carrier_status()
287 iface->flags = ifr.ifr_flags; in carrier_status()
292 strlcpy(ifmr.ifm_name, iface->name, sizeof(ifmr.ifm_name)); in carrier_status()
303 up_interface(struct interface *iface) in up_interface() argument
312 strlcpy(ifr.ifr_name, iface->name, sizeof(ifr.ifr_name)); in up_interface()
326 iface->flags = ifr.ifr_flags; in up_interface()
609 open_udp_socket(struct interface *iface) in open_udp_socket() argument
627 strlcpy(ifr.ifr_name, iface->name, sizeof(ifr.ifr_name)); in open_udp_socket()
644 sin.sin_addr.s_addr = iface->addr.s_addr; in open_udp_socket()
648 iface->udp_fd = s; in open_udp_socket()
658 send_packet(const struct interface *iface, struct in_addr to, in send_packet() argument
667 return sendto(iface->udp_fd, data, len, 0, in send_packet()