Home
last modified time | relevance | path

Searched refs:netmask (Results 1 - 25 of 68) sorted by relevance

123

/third_party/lwip/test/unit/core/
H A Dtest_netif.c96 ip4_addr_t netmask; in NETIF_DECLARE_EXT_CALLBACK() local
101 IP4_ADDR(&netmask, 0, 0, 0, 0); in NETIF_DECLARE_EXT_CALLBACK()
114 netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, ethernet_input); in NETIF_DECLARE_EXT_CALLBACK()
133 IP4_ADDR(&netmask, 255, 255, 255, 0); in NETIF_DECLARE_EXT_CALLBACK()
136 netif_set_netmask(&net_test, &netmask); in NETIF_DECLARE_EXT_CALLBACK()
151 IP4_ADDR(&netmask, 0, 0, 0, 0); in NETIF_DECLARE_EXT_CALLBACK()
154 netif_set_netmask(&net_test, &netmask); in NETIF_DECLARE_EXT_CALLBACK()
166 IP4_ADDR(&netmask, 255, 255, 255, 0); in NETIF_DECLARE_EXT_CALLBACK()
171 netif_set_addr(&net_test, &addr, &netmask, &gw); in NETIF_DECLARE_EXT_CALLBACK()
180 netif_set_netmask(&net_test, &netmask); in NETIF_DECLARE_EXT_CALLBACK()
221 ip4_addr_t netmask; START_TEST() local
[all...]
/third_party/ltp/testcases/network/stress/interface/
H A Dif-addr-adddel.sh17 local netmask=64
20 local netmask=24
37 ifconfig $iface add $new_ip/$netmask
39 ifconfig $iface:1 $new_ip netmask 255.255.255.0
42 ip) ip addr add $new_ip/$netmask dev $iface ;;
64 ifconfig $iface del $new_ip/$netmask
69 ip) ip addr del $new_ip/$netmask dev $iface ;;
H A Dif-addr-addlarge.sh15 [ "$TST_IPV6" ] && local netmask=64 || local netmask=16
50 ifconfig $iface add $new_ip/$netmask
52 ifconfig $iface:$x:$y $new_ip netmask 255.255.0.0
55 ip) ip addr add $new_ip/$netmask dev $iface ;;
75 ifconfig $iface del $new_ip/$netmask
80 ip) ip addr del $new_ip/$netmask dev $iface ;;
/third_party/lwip/src/api/
H A Dnetifapi.c73 API_EXPR_REF(msg->msg.add.netmask), in netifapi_do_netif_add()
98 API_EXPR_REF(msg->msg.add.netmask),
231 const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw,
243 if (netmask == NULL) {
244 netmask = IP4_ADDR_ANY4;
254 NETIFAPI_VAR_REF(msg).msg.add.netmask = NETIFAPI_VAR_REF(netmask);
276 const ip4_addr_t *netmask,
286 if (netmask == NULL) {
287 netmask
[all...]
/third_party/python/Lib/
H A Dipaddress.py25 """A Value Error related to the netmask."""
157 """Helper to split the netmask and raise AddressValueError if needed"""
433 """Turn the prefix length into a bitwise netmask
446 """Return prefix length from the bitwise netmask.
449 ip_int: An integer, the netmask in expanded bitwise format
471 msg = '%r is not a valid netmask' % netmask_str
485 NetmaskValueError: If the input is not a valid netmask
501 """Turn a netmask/hostmask string into a prefix length
504 ip_str: The netmask/hostmask to be converted
510 NetmaskValueError: If the input is not a valid netmask/hostmas
[all...]
/third_party/toybox/toys/pending/
H A Droute.c10 * route add -net target 10.0.0.0 netmask 255.0.0.0 dev eth0
12 * delete net route, must match netmask, informative error message
14 * mod dyn reinstate metric netmask gw mss window irtt dev
30 interface's address and netmask, so the most common use of this command
45 netmask - old way of saying things like ADDR/24
188 * used to get the params like: metric, netmask, gw, mss, window, irtt, dev and their values.
191 static void get_next_params(char **argv, struct rtentry *rt, char **netmask) in get_next_params() argument
204 else if (!strcmp(*argv, "netmask")) { in get_next_params()
205 //when adding a network route, the netmask to be used. in get_next_params()
209 if (addr_mask) help_exit("dup netmask"); in get_next_params()
241 verify_netmask(struct rtentry *rt, char *netmask) verify_netmask() argument
260 char *netmask, *targetip; setroute() local
[all...]
H A Dip.c395 * Used to calculate netmask, which can be in the form of
398 static int get_nmask_prefix(uint32_t *netmask, uint8_t af, in get_nmask_prefix() argument
406 *netmask = (af == AF_INET6) ? 128 : 32; // set default netmask in get_nmask_prefix()
409 if (!ptr || ptr == name || *ptr || !plen || plen > *netmask) { in get_nmask_prefix()
418 *netmask = plen; in get_nmask_prefix()
428 static void parse_prefix(uint32_t *addr, uint32_t *netmask, uint8_t *len, in parse_prefix() argument
437 if (slash) { // grab netmask. in parse_prefix()
438 if (get_nmask_prefix(netmask, af, slash+1, family)) in parse_prefix()
442 else if (af == AF_INET && *addr) *netmask in parse_prefix()
1143 uint32_t addr[4] = {0,}, netmask = 0; ipaddrupdate() local
1205 uint32_t addr[8] = {0,}, netmask = 0; ipaddrupdate() local
1276 int idx; uint32_t netmask = 0, found = 0; ipaddr_listflush() local
1492 uint32_t addr[8] , netmask ; global() member
1802 uint32_t addr[8] = {0,}, netmask = 0; route_get() local
2003 uint32_t addr[8] = {0,}, netmask = 0; route_update() local
2211 uint32_t addr[4] = {0,}, netmask = 0; ruleupdate() local
[all...]
/third_party/lwip/test/unit/dhcp/
H A Dtest_dhcp.c437 ip4_addr_t netmask; in START_TEST() local
447 IP4_ADDR(&netmask, 0, 0, 0, 0); in START_TEST()
450 netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, ethernet_input); in START_TEST()
463 fail_if(memcmp(&netmask, &net_test.netmask, sizeof(ip4_addr_t))); in START_TEST()
491 IP4_ADDR(&netmask, 255, 255, 255, 0); in START_TEST()
494 fail_if(memcmp(&netmask, &net_test.netmask, sizeof(ip4_addr_t))); in START_TEST()
511 ip4_addr_t netmask; in START_TEST() local
520 IP4_ADDR(&netmask, in START_TEST()
732 ip4_addr_t netmask; START_TEST() local
822 ip4_addr_t netmask; START_TEST() local
985 ip4_addr_t netmask; START_TEST() local
[all...]
/third_party/node/lib/
H A Dos.js220 function getCIDR(address, netmask, family) {
234 for (let i = 0; i < netmask.length; i++) {
235 if (netmask[i] !== split) {
236 if (i + 1 < netmask.length) {
241 const part = StringPrototypeSlice(netmask, lastPos, i);
268 * netmask: string,
286 netmask: data[i + 2],
/third_party/rust/crates/nix/src/
H A Difaddrs.rs28 pub netmask: Option<SockaddrStorage>,
52 /// memcpy sa_len of the netmask to that new storage. Finally, we reset the
89 let netmask = unsafe { workaround_xnu_bug(info) }; in from_libc_ifaddrs()
91 let netmask = in from_libc_ifaddrs()
97 netmask, in from_libc_ifaddrs()
149 /// `address`, `netmask`, `broadcast`, and `destination`. For any entry not
190 // Ensures getting the netmask works, and in particular that
196 let sock = if let Some(sock) = iface.netmask { in test_getifaddrs_netmask_correct()
/third_party/libuv/src/unix/
H A Dbsd-ifaddrs.c117 memset(&address->netmask, 0, sizeof(address->netmask)); in uv_interface_addresses()
119 address->netmask.netmask6 = *((struct sockaddr_in6*) ent->ifa_netmask); in uv_interface_addresses()
121 address->netmask.netmask4 = *((struct sockaddr_in*) ent->ifa_netmask); in uv_interface_addresses()
/third_party/node/deps/uv/src/unix/
H A Dbsd-ifaddrs.c117 memset(&address->netmask, 0, sizeof(address->netmask)); in uv_interface_addresses()
119 address->netmask.netmask6 = *((struct sockaddr_in6*) ent->ifa_netmask); in uv_interface_addresses()
121 address->netmask.netmask4 = *((struct sockaddr_in*) ent->ifa_netmask); in uv_interface_addresses()
/third_party/node/deps/cares/src/lib/
H A Dares__iface_ips.c68 unsigned char netmask; member
149 unsigned char netmask, unsigned int ll_scope) in ares__iface_ips_add()
217 ips->ips[idx].netmask = netmask; in ares__iface_ips_add()
268 return ips->ips[idx].netmask; in ares__iface_ips_get_netmask()
410 ipaddr->OnLinkPrefixLength /* netmask */, in ares__iface_ips_enumerate()
452 unsigned char netmask = 0; in ares__iface_ips_enumerate() local
472 /* netmask */ in ares__iface_ips_enumerate()
474 netmask = count_addr_bits((const void *)&sockaddr_in->sin_addr, 4); in ares__iface_ips_enumerate()
481 /* netmask */ in ares__iface_ips_enumerate()
147 ares__iface_ips_add(ares__iface_ips_t *ips, ares__iface_ip_flags_t flags, const char *name, const struct ares_addr *addr, unsigned char netmask, unsigned int ll_scope) ares__iface_ips_add() argument
[all...]
H A Dares_update_servers.c97 unsigned char netmask) in ares__subnet_match()
117 if (netmask > 32) { in ares__subnet_match()
125 if (netmask > 128) { in ares__subnet_match()
132 for (i = 0; i < len && netmask > 0; i++) { in ares__subnet_match()
134 if (netmask < 8) { in ares__subnet_match()
135 mask <<= (8 - netmask); in ares__subnet_match()
136 netmask = 0; in ares__subnet_match()
138 netmask -= 8; in ares__subnet_match()
168 unsigned char netmask; in ares_server_blacklisted() member
190 if (ares__subnet_match(addr, &subnet, blacklist_v6[i].netmask)) { in ares_server_blacklisted()
95 ares__subnet_match(const struct ares_addr *addr, const struct ares_addr *subnet, unsigned char netmask) ares__subnet_match() argument
[all...]
/third_party/lwip/src/include/lwip/
H A Dip4_addr.h130 /** Get the network address by combining host address with netmask */
131 #define ip4_addr_get_network(target, host, netmask) do { ((target)->addr = ((host)->addr) & ((netmask)->addr)); } while(0)
153 #define ip_addr_netmask_valid(netmask) ip4_addr_netmask_valid((netmask)->addr)
154 u8_t ip4_addr_netmask_valid(u32_t netmask);
H A Dnetif.h272 ip_addr_t netmask; member
449 const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw,
451 void netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask,
473 void netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask);
478 #define netif_ip4_netmask(netif) ((const ip4_addr_t*)ip_2_ip4(&((netif)->netmask)))
484 #define netif_ip_netmask4(netif) ((const ip_addr_t*)&((netif)->netmask))
624 /** IPv4 netmask has changed */
626 /** called AFTER IPv4 address/gateway/netmask changes have been applied */
/third_party/lwip/src/core/
H A Dnetif.c301 * @param netmask network mask for the new netif
329 const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw,
361 if (netmask == NULL) {
362 netmask = ip_2_ip4(IP4_ADDR_ANY);
370 ip_addr_set_zero_ip4(&netif->netmask);
433 netif_set_addr(netif, ipaddr, netmask, gw);
512 LWIP_DEBUGF(NETIF_DEBUG, (" netmask "));
513 ip4_addr_debug_print(NETIF_DEBUG, netmask);
579 * @note call netif_set_addr() if you also want to change netmask and
606 netif_do_set_netmask(struct netif *netif, const ip4_addr_t *netmask, ip_addr_ argument
324 netif_add(struct netif *netif, struct net_group *group, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input) global() argument
643 netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask) global() argument
741 netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw) global() argument
[all...]
/third_party/libcoap/examples/lwip/
H A Dserver.c48 static ip4_addr_t ipaddr, netmask, gw; variable
90 IP4_ADDR(&netmask, 255,255,255,0); in main()
98 netif_add(&netif, &ipaddr, &netmask, &gw, NULL, tapif_init, ethernet_input); in main()
H A Dclient.c48 static ip4_addr_t ipaddr, netmask, gw; variable
92 IP4_ADDR(&netmask, 255,255,255,0); in main()
100 netif_add(&netif, &ipaddr, &netmask, &gw, NULL, tapif_init, ethernet_input); in main()
/third_party/backends/frontend/
H A Dsaned.c565 check_v4_in_range (struct sockaddr_in *sin, char *base_ip, char *netmask) in check_v4_in_range() argument
577 cidr = strtol (netmask, &end, 10); in check_v4_in_range()
580 if ((cidr < 0) || (cidr > 32) || (end == netmask)) in check_v4_in_range()
582 DBG (DBG_ERR, "check_v4_in_range: invalid CIDR value (%s) !\n", netmask); in check_v4_in_range()
631 check_v6_in_range (struct sockaddr_in6 *sin6, char *base_ip, char *netmask) in check_v6_in_range() argument
643 cidr = strtol (netmask, &end, 10); in check_v6_in_range()
646 if ((cidr < 0) || (cidr > 128) || (end == netmask)) in check_v6_in_range()
648 DBG (DBG_ERR, "check_v6_in_range: invalid CIDR value (%s) !\n", netmask); in check_v6_in_range()
699 check_v4_in_range (struct in_addr *inaddr, struct in_addr *base, char *netmask) in check_v4_in_range() argument
708 cidr = strtol (netmask, in check_v4_in_range()
768 char *netmask; check_host() local
1151 char *netmask; check_host() local
[all...]
/third_party/node/src/
H A Dnode_os.cc179 char netmask[INET6_ADDRSTRLEN]; in GetInterfaceAddresses() local
220 uv_ip4_name(&interfaces[i].netmask.netmask4, netmask, sizeof(netmask)); in GetInterfaceAddresses()
224 uv_ip6_name(&interfaces[i].netmask.netmask6, netmask, sizeof(netmask)); in GetInterfaceAddresses()
233 result.emplace_back(OneByteString(isolate, netmask)); in GetInterfaceAddresses()
/third_party/lwip/test/unit/mqtt/
H A Dtest_mqtt.c22 test_mqtt_init_netif(struct netif *netif, const ip_addr_t *ip_addr, const ip_addr_t *netmask) in test_mqtt_init_netif() argument
28 ip_addr_copy_from_ip4(netif->netmask, *ip_2_ip4(netmask)); in test_mqtt_init_netif()
/third_party/libuv/test/
H A Dtest-platform-output.c139 if (interfaces[i].netmask.netmask4.sin_family == AF_INET) { in TEST_IMPL()
140 uv_ip4_name(&interfaces[i].netmask.netmask4, buffer, sizeof(buffer)); in TEST_IMPL()
141 printf(" netmask: %s\n", buffer); in TEST_IMPL()
142 } else if (interfaces[i].netmask.netmask4.sin_family == AF_INET6) { in TEST_IMPL()
143 uv_ip6_name(&interfaces[i].netmask.netmask6, buffer, sizeof(buffer)); in TEST_IMPL()
144 printf(" netmask: %s\n", buffer); in TEST_IMPL()
146 printf(" netmask: none\n"); in TEST_IMPL()
/third_party/FreeBSD/sys/dev/usb/net/
H A Dusb_eth_drv.c65 ip4_addr_t ipaddr, netmask, gw; in eth_drv_init() local
70 IP4_ADDR(&netmask, 255, 255, 255, 0); in eth_drv_init()
87 ret = netifapi_netif_add(usb_netif, &ipaddr, &netmask, &gw); in eth_drv_init()
/third_party/lwip/test/fuzz/
H A Dfuzz.c145 ip4_addr_t netmask; in main() local
152 IP4_ADDR(&netmask, 255, 255, 255, 0); in main()
155 netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, ethernet_input); in main()

Completed in 16 milliseconds

123