Home
last modified time | relevance | path

Searched full:netmask (Results 1 – 25 of 1017) sorted by relevance

12345678910>>...41

/aosp_15_r20/external/python/ipaddress/
Dipaddress.py132 """A Value Error related to the netmask."""
279 """Helper to split the netmask and raise AddressValueError if needed"""
558 """Turn the prefix length into a bitwise netmask
571 """Return prefix length from the bitwise netmask.
574 ip_int: An integer, the netmask in expanded bitwise format
590 msg = 'Netmask pattern %r mixes zeroes & ones'
596 msg = '%r is not a valid netmask' % netmask_str
610 NetmaskValueError: If the input is not a valid netmask
626 """Turn a netmask/hostmask string into a prefix length
629 ip_str: The netmask/hostmask to be converted
[all …]
/aosp_15_r20/prebuilts/clang/host/linux-x86/clang-r530567/python3/lib/python3.11/
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
465 msg = 'Netmask pattern %r mixes zeroes & ones'
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
[all …]
/aosp_15_r20/prebuilts/clang/host/linux-x86/clang-r536225/python3/lib/python3.11/
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
465 msg = 'Netmask pattern %r mixes zeroes & ones'
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
[all …]
/aosp_15_r20/prebuilts/clang/host/linux-x86/clang-r530567b/python3/lib/python3.11/
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
465 msg = 'Netmask pattern %r mixes zeroes & ones'
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
[all …]
/aosp_15_r20/prebuilts/build-tools/common/py3-stdlib/
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
465 msg = 'Netmask pattern %r mixes zeroes & ones'
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
[all …]
/aosp_15_r20/external/python/cpython3/Lib/
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
465 msg = 'Netmask pattern %r mixes zeroes & ones'
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
[all …]
/aosp_15_r20/prebuilts/clang/host/linux-x86/clang-r522817/python3/lib/python3.11/
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
465 msg = 'Netmask pattern %r mixes zeroes & ones'
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
[all …]
/aosp_15_r20/external/toybox/toys/pending/
H A Droute.c9 * route add -net target 10.0.0.0 netmask 255.0.0.0 dev eth0
11 * delete net route, must match netmask, informative error message
13 * mod dyn reinstate metric netmask gw mss window irtt dev
40 netmask - old way of saying things like ADDR/24
145 char dest[INET6_ADDRSTRLEN], gate[INET6_ADDRSTRLEN], netmask[32], in display_routes() local
156 strcpy(netmask, "0.0.0.0"); in display_routes()
165 inet_ntop(AF_INET, &netmask_addr, netmask, sizeof(netmask)); in display_routes()
217 xprintf("%-15.15s %-15.15s %-16s%-6s", dest, gate, netmask, flags); in display_routes()
308 } else if (!strcmp(*argv, "netmask")) { in setroute()
309 uint32_t netmask; in 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 = 32; in parse_prefix()
443 else if (af == AF_INET6 && (*addr || *(addr+3))) *netmask = 128; in parse_prefix()
[all …]
/aosp_15_r20/development/scripts/
H A Dreverse_tether.sh17 : ${NETMASK:=255.255.255.0}
72 echo " -m netmask NETMASK=$NETMASK"
101 $ADB shell "ifconfig $PHONE_DEV $PHONE_IP netmask $NETMASK up"
102 sudo ifconfig $HOST_DEV $HOST_IP netmask $NETMASK up
127 $ADB shell "ifconfig $PHONE_DEV $PHONE_IP netmask $NETMASK up"
161 sudo ifconfig $HOST_DEV $HOST_IP netmask $NETMASK up
168 sudo ifconfig usb0 $HOST_IP netmask $NETMASK up
219 -m) shift; NETMASK=$1 ;;
/aosp_15_r20/external/dnsmasq/src/
H A Ddhcp.c27 static int complete_context(struct in_addr local, int if_index, struct in_addr netmask,
262 /* This is a complex routine: it gets called with each (address,netmask,broadcast) triple
266 2) Fills in any netmask and broadcast addresses which have not been explicitly configured.
274 static int complete_context(struct in_addr local, int if_index, struct in_addr netmask, in complete_context() argument
280 if (!(context->flags & CONTEXT_NETMASK) && (is_same_net(local, context->start, netmask) || in complete_context()
281 is_same_net(local, context->end, netmask))) { in complete_context()
282 if (context->netmask.s_addr != netmask.s_addr && in complete_context()
283 !(is_same_net(local, context->start, netmask) && in complete_context()
284 is_same_net(local, context->end, netmask))) { in complete_context()
288 _("DHCP range %s -- %s is not consistent with netmask %s"), in complete_context()
[all …]
/aosp_15_r20/external/sdv/vsomeip/third_party/boost/asio/test/ip/
Dnetwork_v4.cpp55 ip::address_v4 addr2 = net1.netmask(); in test()
163 BOOST_ASIO_CHECK(msg == std::string("non-contiguous netmask")); in test()
174 BOOST_ASIO_CHECK(msg == std::string("non-contiguous netmask")); in test()
176 // calculate netmask in test()
179 BOOST_ASIO_CHECK(net4.netmask() == make_address_v4("255.255.254.0")); in test()
182 BOOST_ASIO_CHECK(net5.netmask() == make_address_v4("255.240.0.0")); in test()
185 BOOST_ASIO_CHECK(net6.netmask() == make_address_v4("255.255.255.0")); in test()
188 BOOST_ASIO_CHECK(net7.netmask() == make_address_v4("255.255.0.0")); in test()
191 BOOST_ASIO_CHECK(net8.netmask() == make_address_v4("255.0.0.0")); in test()
194 BOOST_ASIO_CHECK(net9.netmask() == make_address_v4("255.255.255.255")); in test()
[all …]
Daddress_v4.cpp104 addr1 = ip::address_v4::netmask(addr2); in test()
307 BOOST_ASIO_CHECK(address_v4::netmask(address_v4(0x01000000)) == class_a_net); in test()
308 BOOST_ASIO_CHECK(address_v4::netmask(address_v4(0x7F000000)) == class_a_net); in test()
309 BOOST_ASIO_CHECK(address_v4::netmask(address_v4(0x80000000)) == class_b_net); in test()
310 BOOST_ASIO_CHECK(address_v4::netmask(address_v4(0xBFFF0000)) == class_b_net); in test()
311 BOOST_ASIO_CHECK(address_v4::netmask(address_v4(0xC0000000)) == class_c_net); in test()
312 BOOST_ASIO_CHECK(address_v4::netmask(address_v4(0xDFFFFF00)) == class_c_net); in test()
313 BOOST_ASIO_CHECK(address_v4::netmask(address_v4(0xE0000000)) == other_net); in test()
314 BOOST_ASIO_CHECK(address_v4::netmask(address_v4(0xEFFFFFFF)) == other_net); in test()
315 BOOST_ASIO_CHECK(address_v4::netmask(address_v4(0xF0000000)) == other_net); in test()
[all …]
/aosp_15_r20/packages/modules/Connectivity/staticlibs/framework/com/android/net/module/util/
DInet4AddressUtils.java87 * Convert a network prefix length to an IPv4 netmask integer (prefixLength 17 -> 0xffff8000)
88 * @return the IPv4 netmask as an integer
100 * Convert a network prefix length to an IPv4 netmask integer (prefixLength 17 -> 0x0080ffff).
104 * @return the IPv4 netmask as an integer
112 * Convert an IPv4 netmask to a prefix length, checking that the netmask is contiguous.
113 * @param netmask as a {@code Inet4Address}.
115 * @throws IllegalArgumentException the specified netmask was not contiguous.
118 public static int netmaskToPrefixLength(Inet4Address netmask) { in netmaskToPrefixLength() argument
120 int i = inet4AddressToIntHTH(netmask); in netmaskToPrefixLength()
124 throw new IllegalArgumentException("Non-contiguous netmask: " + Integer.toHexString(i)); in netmaskToPrefixLength()
[all …]
/aosp_15_r20/external/google-cloud-java/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/
H A DIPAllocationPolicy.java274 * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
275 * netmask.
299 * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
300 * netmask.
337 * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
338 * netmask.
459 * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
460 * netmask.
484 * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
485 * netmask.
[all …]
H A DIPAllocationPolicyOrBuilder.java98 * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
99 * netmask.
121 * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
122 * netmask.
144 * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
145 * netmask.
217 * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
218 * netmask.
240 * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
241 * netmask.
[all …]
/aosp_15_r20/external/google-cloud-java/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/
H A DIPAllocationPolicy.java230 * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
231 * netmask.
266 * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
267 * netmask.
307 * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
308 * netmask.
343 * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
344 * netmask.
1162 * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
1163 * netmask.
[all …]
/aosp_15_r20/external/google-cloud-java/java-container/proto-google-cloud-container-v1beta1/src/main/java/com/google/container/v1beta1/
H A DIPAllocationPolicyOrBuilder.java256 * Set to /netmask (e.g. `/14`) to have a range chosen with a specific
257 * netmask.
278 * Set to /netmask (e.g. `/14`) to have a range chosen with a specific
279 * netmask.
300 * Set to /netmask (e.g. `/14`) to have a range chosen with a specific
301 * netmask.
321 * Set to /netmask (e.g. `/14`) to have a range chosen with a specific
322 * netmask.
344 * Set to /netmask (e.g. `/14`) to have a range chosen with a specific
345 * netmask.
[all …]
H A DIPAllocationPolicy.java797 * Set to /netmask (e.g. `/14`) to have a range chosen with a specific
798 * netmask.
830 * Set to /netmask (e.g. `/14`) to have a range chosen with a specific
831 * netmask.
867 * Set to /netmask (e.g. `/14`) to have a range chosen with a specific
868 * netmask.
899 * Set to /netmask (e.g. `/14`) to have a range chosen with a specific
900 * netmask.
937 * Set to /netmask (e.g. `/14`) to have a range chosen with a specific
938 * netmask.
[all …]
/aosp_15_r20/external/google-cloud-java/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/
H A DIPAllocationPolicyOrBuilder.java256 * Set to /netmask (e.g. `/14`) to have a range chosen with a specific
257 * netmask.
278 * Set to /netmask (e.g. `/14`) to have a range chosen with a specific
279 * netmask.
300 * Set to /netmask (e.g. `/14`) to have a range chosen with a specific
301 * netmask.
321 * Set to /netmask (e.g. `/14`) to have a range chosen with a specific
322 * netmask.
344 * Set to /netmask (e.g. `/14`) to have a range chosen with a specific
345 * netmask.
[all …]
H A DIPAllocationPolicy.java483 * Set to /netmask (e.g. `/14`) to have a range chosen with a specific
484 * netmask.
516 * Set to /netmask (e.g. `/14`) to have a range chosen with a specific
517 * netmask.
553 * Set to /netmask (e.g. `/14`) to have a range chosen with a specific
554 * netmask.
585 * Set to /netmask (e.g. `/14`) to have a range chosen with a specific
586 * netmask.
623 * Set to /netmask (e.g. `/14`) to have a range chosen with a specific
624 * netmask.
[all …]
/aosp_15_r20/external/scapy/scapy/
H A Dbase_classes.py57 def _parse_digit(a,netmask): argument
58 netmask = min(8,max(netmask,0))
65 a = (x & (0xff<<netmask) , max(y, (x | (0xff>>(8-netmask))))+1)
67 a = (int(a) & (0xff<<netmask),(int(a) | (0xff>>(8-netmask)))+1)
75 netmask = int(tmp[1])
76 … ret_list = [cls._parse_digit(x, y-netmask) for (x, y) in zip(tmp[0].split('.'), [8, 16, 24, 32])]
77 return ret_list, netmask
81 self.parsed,self.netmask = self._parse_net(net)
/aosp_15_r20/external/scapy/scapy/arch/
H A Dunix.py86 netmask = 0
89 netmask = scapy.utils.atol(mask)
91 dest,netmask = dest.split("/")
92 netmask = scapy.utils.itom(int(netmask))
94 netmask = scapy.utils.itom((dest.count(".") + 1) * 8)
104 routes.append((dest,netmask, gw, netif, ifaddr, metric))
113 routes.append((dest, netmask, gw, guessed_netif, ifaddr, metric))
119 pending_if.append((dest,netmask,gw))
125 for dest,netmask,gw in pending_if:
137 routes.append((dest,netmask, gw, gw_if, gw_if_addr, metric))
/aosp_15_r20/external/cronet/components/cronet/tools/
H A Dandroid_rndis_forwarder.py305 ifconfig rndis0 %(device_ip_address)s netmask 255.255.255.0 up
307 ifconfig usb0 %(device_ip_address)s netmask 255.255.255.0 up
373 match = re.search(r'(?<=netmask )\S+', line)
415 def _NextUnusedAddress(network, netmask, used_addresses): argument
417 for suffix in range(1, 0xFFFFFFFF & ~netmask):
459 ' netmask 255.255.255.0',
469 host_ip, netmask = host_address # pylint: disable=unpacking-non-sequence
470 network = host_ip & netmask
487 device_ip = _NextUnusedAddress(network, netmask, used_addresses)
493 netmask = _Long2Ip(netmask)
[all …]
/aosp_15_r20/external/rust/android-crates-io/crates/nix/src/
Difaddrs.rs27 /// Netmask of this interface
28 pub netmask: Option<SockaddrStorage>, field
52 /// memcpy sa_len of the netmask to that new storage. Finally, we reset the
91 let netmask = unsafe { workaround_xnu_bug(info) }; in from_libc_ifaddrs() localVariable
93 let netmask = in from_libc_ifaddrs() localVariable
101 netmask, in from_libc_ifaddrs()
153 /// `address`, `netmask`, `broadcast`, and `destination`. For any entry not
194 // Ensures getting the netmask works, and in particular that
200 let sock = if let Some(sock) = iface.netmask { in test_getifaddrs_netmask_correct()

12345678910>>...41