• Home
  • Raw
  • Download

Lines Matching refs:name

165 static void ifc_init_ifr(const char *name, struct ifreq *ifr)  in ifc_init_ifr()  argument
168 strncpy(ifr->ifr_name, name, IFNAMSIZ); in ifc_init_ifr()
172 int ifc_get_hwaddr(const char *name, void *ptr) in ifc_get_hwaddr() argument
176 ifc_init_ifr(name, &ifr); in ifc_get_hwaddr()
185 int ifc_get_ifindex(const char *name, int *if_indexp) in ifc_get_ifindex() argument
189 ifc_init_ifr(name, &ifr); in ifc_get_ifindex()
198 static int ifc_set_flags(const char *name, unsigned set, unsigned clr) in ifc_set_flags() argument
201 ifc_init_ifr(name, &ifr); in ifc_set_flags()
208 int ifc_up(const char *name) in ifc_up() argument
210 int ret = ifc_set_flags(name, IFF_UP, 0); in ifc_up()
211 if (DBG) printerr("ifc_up(%s) = %d", name, ret); in ifc_up()
215 int ifc_down(const char *name) in ifc_down() argument
217 int ret = ifc_set_flags(name, 0, IFF_UP); in ifc_down()
218 if (DBG) printerr("ifc_down(%s) = %d", name, ret); in ifc_down()
230 int ifc_set_addr(const char *name, in_addr_t addr) in ifc_set_addr() argument
235 ifc_init_ifr(name, &ifr); in ifc_set_addr()
239 if (DBG) printerr("ifc_set_addr(%s, xx) = %d", name, ret); in ifc_set_addr()
252 int ifc_act_on_address(int action, const char *name, const char *address, in ifc_act_on_address() argument
274 ifindex = if_nametoindex(name); in ifc_act_on_address()
342 int ifc_add_address(const char *name, const char *address, int prefixlen) { in ifc_add_address() argument
343 return ifc_act_on_address(RTM_NEWADDR, name, address, prefixlen); in ifc_add_address()
346 int ifc_del_address(const char *name, const char * address, int prefixlen) { in ifc_del_address() argument
347 return ifc_act_on_address(RTM_DELADDR, name, address, prefixlen); in ifc_del_address()
353 int ifc_clear_ipv6_addresses(const char *name) { in ifc_clear_ipv6_addresses() argument
368 if (strcmp(name, ifname)) { in ifc_clear_ipv6_addresses()
402 void ifc_clear_ipv4_addresses(const char *name) { in ifc_clear_ipv4_addresses() argument
406 if (ifc_get_addr(name, &addr) < 0) in ifc_clear_ipv4_addresses()
409 ifc_set_addr(name, 0); in ifc_clear_ipv4_addresses()
417 int ifc_clear_addresses(const char *name) { in ifc_clear_addresses() argument
418 ifc_clear_ipv4_addresses(name); in ifc_clear_addresses()
419 return ifc_clear_ipv6_addresses(name); in ifc_clear_addresses()
422 int ifc_set_hwaddr(const char *name, const void *ptr) in ifc_set_hwaddr() argument
426 ifc_init_ifr(name, &ifr); in ifc_set_hwaddr()
433 int ifc_set_mask(const char *name, in_addr_t mask) in ifc_set_mask() argument
438 ifc_init_ifr(name, &ifr); in ifc_set_mask()
442 if (DBG) printerr("ifc_set_mask(%s, xx) = %d", name, ret); in ifc_set_mask()
446 int ifc_set_prefixLength(const char *name, int prefixLength) in ifc_set_prefixLength() argument
453 ifc_init_ifr(name, &ifr); in ifc_set_prefixLength()
459 int ifc_get_addr(const char *name, in_addr_t *addr) in ifc_get_addr() argument
464 ifc_init_ifr(name, &ifr); in ifc_get_addr()
476 int ifc_get_info(const char *name, in_addr_t *addr, int *prefixLength, unsigned *flags) in ifc_get_info() argument
479 ifc_init_ifr(name, &ifr); in ifc_get_info()
554 int ifc_create_default_route(const char *name, in_addr_t gw) in ifc_create_default_route() argument
561 int ret = ifc_act_on_ipv4_route(SIOCADDRT, name, in_dst, 0, in_gw); in ifc_create_default_route()
562 if (DBG) printerr("ifc_create_default_route(%s, %d) = %d", name, gw, ret); in ifc_create_default_route()