/titanic_44/usr/src/lib/libinetutil/common/ |
H A D | inetutil.c | 112 plen2mask(uint_t prefixlen, sa_family_t af, struct sockaddr *mask) in plen2mask() argument 117 if (prefixlen > IP_ABITS) in plen2mask() 123 if (prefixlen > IPV6_ABITS) in plen2mask() 131 while (prefixlen > 0) { in plen2mask() 132 if (prefixlen >= 8) { in plen2mask() 134 prefixlen -= 8; in plen2mask() 137 *addr |= 1 << (8 - prefixlen); in plen2mask() 138 prefixlen--; in plen2mask()
|
/titanic_44/usr/src/cmd/mdb/common/mdb/ |
H A D | mdb_demangle.c | 209 size_t prefixlen; in mdb_dem_process() local 213 prefixlen = prefix - name; in mdb_dem_process() 215 if (prefixlen >= len) in mdb_dem_process() 218 (void) strncpy(buf, name, prefixlen); in mdb_dem_process() 223 name += prefixlen; in mdb_dem_process() 224 buf += prefixlen; in mdb_dem_process() 225 len -= prefixlen; in mdb_dem_process()
|
/titanic_44/usr/src/cmd/cmd-inet/lib/nwamd/ |
H A D | conditions.c | 376 prefixmatch(uchar_t *addr1, uchar_t *addr2, int prefixlen) in prefixmatch() argument 381 if (prefixlen == 0) in prefixmatch() 384 while (prefixlen > 0) { in prefixmatch() 385 if (prefixlen >= 8) { in prefixmatch() 387 prefixlen -= 8; in prefixmatch() 389 mask[j] |= 1 << (8 - prefixlen); in prefixmatch() 390 prefixlen--; in prefixmatch() 436 int prefixlen; member 461 match = prefixmatch(addr1, addr2, wa->prefixlen); in check_ipaddr() 501 wa.prefixlen = IP_ABITS; in test_condition_ip_address() [all …]
|
/titanic_44/usr/src/cmd/cmd-inet/usr.sbin/ilbadm/ |
H A D | ilbadm_subr.c | 772 in_prefixlentomask(int prefixlen, int maxlen, uchar_t *mask) in in_prefixlentomask() argument 774 if (prefixlen < 0 || prefixlen > maxlen) in in_prefixlentomask() 777 while (prefixlen > 0) { in in_prefixlentomask() 778 if (prefixlen >= 8) { in in_prefixlentomask() 780 prefixlen -= 8; in in_prefixlentomask() 783 *mask |= 1 << (8 - prefixlen); in in_prefixlentomask() 784 prefixlen--; in in_prefixlentomask() 792 int prefixlen, maxval; in ilbadm_set_netmask() local 802 prefixlen = strtol(val, &end, 10); in ilbadm_set_netmask() 808 if (prefixlen < 1 || prefixlen > maxval) { in ilbadm_set_netmask() [all …]
|
/titanic_44/usr/src/cmd/cmd-inet/usr.sbin/ifconfig/ |
H A D | ifconfig.c | 193 static boolean_t in_prefixlentomask(int prefixlen, int maxlen, 927 int prefixlen = 0; in setifaddr() local 939 (*afp->af_getaddr)(addr, (struct sockaddr *)&laddr, &prefixlen); in setifaddr() 943 switch (prefixlen) { in setifaddr() 954 if (!in_prefixlentomask(prefixlen, IPV6_ABITS, in setifaddr() 958 prefixlen); in setifaddr() 963 if (!in_prefixlentomask(prefixlen, IP_ABITS, in setifaddr() 967 prefixlen); in setifaddr() 1007 prefixlen = mask2plen((struct sockaddr *)&lifr.lifr_addr); in setifaddr() 1009 addrstr, prefixlen); in setifaddr() [all …]
|
/titanic_44/usr/src/cmd/cmd-inet/usr.lib/in.ndpd/ |
H A D | config.c | 650 int prefixlen; in parse_prefix() local 665 prefixlen = parse_addrprefix(prefix, &in6); in parse_prefix() 666 if (prefixlen == -1) { in parse_prefix() 684 adv_pr = adv_prefix_lookup(pi, in6, prefixlen); in parse_prefix() 688 adv_pr = adv_prefix_create(pi, in6, prefixlen); in parse_prefix() 874 int prefixlen; in parse_addrprefix() local 887 prefixlen = strtol(cp, &end, 10); in parse_addrprefix() 891 if (prefixlen < 0 || prefixlen > IPV6_ABITS) in parse_addrprefix() 897 return (prefixlen); in parse_addrprefix()
|
H A D | tables.c | 992 prefix_lookup(struct phyint *pi, struct in6_addr prefix, int prefixlen) in prefix_lookup() argument 1000 abuf, sizeof (abuf)), prefixlen); in prefix_lookup() 1004 if (pr->pr_prefix_len == prefixlen && in prefix_lookup() 1005 prefix_equal(prefix, pr->pr_prefix, prefixlen)) in prefix_lookup() 1099 int prefixlen; in prefix_lookup_addr_match() local 1107 prefixlen = pr->pr_prefix_len; in prefix_lookup_addr_match() 1109 otherpr = prefix_lookup(pi, prefix, prefixlen); in prefix_lookup_addr_match() 1124 prefix_create(struct phyint *pi, struct in6_addr prefix, int prefixlen, in prefix_create() argument 1133 abuf, sizeof (abuf)), prefixlen, flags); in prefix_create() 1144 prefix_set(&pr->pr_prefix, prefix, prefixlen); in prefix_create() [all …]
|
/titanic_44/usr/src/lib/libdladm/common/ |
H A D | libdlflow.c | 846 dladm_prefixlen2mask(int prefixlen, int maxlen, uchar_t *mask) in dladm_prefixlen2mask() argument 848 if (prefixlen < 0 || prefixlen > maxlen) in dladm_prefixlen2mask() 851 while (prefixlen > 0) { in dladm_prefixlen2mask() 852 if (prefixlen >= 8) { in dladm_prefixlen2mask() 854 prefixlen -= 8; in dladm_prefixlen2mask() 857 *mask |= 1 << (8 - prefixlen); in dladm_prefixlen2mask() 858 prefixlen--; in dladm_prefixlen2mask() 864 dladm_mask2prefixlen(in6_addr_t *mask, int plen, int *prefixlen) in dladm_mask2prefixlen() argument 890 *prefixlen = plen; in dladm_mask2prefixlen()
|
H A D | libdlstat.c | 1379 int prefixlen; in i_dlstat_get_idlist() local 1391 prefixlen = strlen(prefix); in i_dlstat_get_idlist() 1395 idlist[(*size)++] = atoi(&ksp->ks_name[prefixlen]); in i_dlstat_get_idlist()
|
/titanic_44/usr/src/uts/common/io/scsi/adapters/iscsi/ |
H A D | iscsi_net.c | 834 iscsi_prefixlentomask(int prefixlen, int maxlen, uchar_t *mask) in iscsi_prefixlentomask() argument 836 if (prefixlen < 0 || prefixlen > maxlen || mask == NULL) { in iscsi_prefixlentomask() 840 while (prefixlen > 0) { in iscsi_prefixlentomask() 841 if (prefixlen >= 8) { in iscsi_prefixlentomask() 844 prefixlen = prefixlen - 8; in iscsi_prefixlentomask() 847 *mask = *mask | (1 << (8 - prefixlen)); in iscsi_prefixlentomask() 848 prefixlen--; in iscsi_prefixlentomask()
|
/titanic_44/usr/src/lib/libipadm/common/ |
H A D | ipadm_persist.c | 224 uint32_t prefixlen; in i_ipadm_intfid_nvp2dbline() local 241 if (nvlist_lookup_uint32(v, IPADM_NVP_PREFIXLEN, &prefixlen) != 0 || in i_ipadm_intfid_nvp2dbline() 246 prefixlen, stateless, stateful); in i_ipadm_intfid_nvp2dbline() 557 char *prefixlen; in i_ipadm_intfid_dbline2nvl() local 572 prefixlen = cp; in i_ipadm_intfid_dbline2nvl() 578 ipaddr.ipadm_intfidlen = (uint32_t)strtoul(prefixlen, &endp, 10); in i_ipadm_intfid_dbline2nvl()
|
H A D | ipadm_addr.c | 909 unsigned long prefixlen, abits; in i_ipadm_set_prefixlen() local 917 prefixlen = strtoul(pval, &end, 10); in i_ipadm_set_prefixlen() 922 if (prefixlen == 0 || prefixlen == (abits - 1)) in i_ipadm_set_prefixlen() 925 if ((err = plen2mask(prefixlen, af, (struct sockaddr *)&netmask)) != 0) in i_ipadm_set_prefixlen() 1174 uint32_t prefixlen; in i_ipadm_get_prefixlen() local 1209 &lifr.lifr_addr, &prefixlen); in i_ipadm_get_prefixlen() 1229 &ipaddr->ipadm_static_addr, &prefixlen); in i_ipadm_get_prefixlen() 1233 nbytes = snprintf(buf, *bufsize, "%u", prefixlen); in i_ipadm_get_prefixlen() 1238 prefixlen = lifr.lifr_addrlen; in i_ipadm_get_prefixlen() 1239 nbytes = snprintf(buf, *bufsize, "%u", prefixlen); in i_ipadm_get_prefixlen() [all …]
|
/titanic_44/usr/src/cmd/cmd-inet/usr.sbin/ |
H A D | route.c | 256 static boolean_t in_prefixlentomask(int prefixlen, int maxlen, 2344 int prefixlen; in in_getprefixlen() local 2357 prefixlen = strtoul(str, &end, 10); in in_getprefixlen() 2362 if (prefixlen > max_plen) { in in_getprefixlen() 2367 return (prefixlen); in in_getprefixlen() 2376 in_prefixlentomask(int prefixlen, int maxlen, uchar_t *mask) in in_prefixlentomask() argument 2378 if (prefixlen < 0 || prefixlen > maxlen) in in_prefixlentomask() 2381 while (prefixlen > 0) { in in_prefixlentomask() 2382 if (prefixlen >= 8) { in in_prefixlentomask() 2384 prefixlen -= 8; in in_prefixlentomask() [all …]
|
/titanic_44/usr/src/lib/libnwam/common/ |
H A D | libnwam_util.c | 642 int prefixlen; in nwam_valid_prefix() local 646 prefixlen = strtol(prefix, &end, 10); in nwam_valid_prefix() 647 if (prefix == end || prefixlen < 0 || prefixlen > max_plen) in nwam_valid_prefix()
|
/titanic_44/usr/src/cmd/zoneadmd/ |
H A D | vplat.c | 1846 int prefixlen; in addr2netmask() local 1848 prefixlen = atoi(prefixstr); in addr2netmask() 1849 if (prefixlen < 0 || prefixlen > maxprefixlen) in addr2netmask() 1851 while (prefixlen > 0) { in addr2netmask() 1852 if (prefixlen >= 8) { in addr2netmask() 1854 prefixlen -= 8; in addr2netmask() 1857 *maskstr |= 1 << (8 - prefixlen); in addr2netmask() 1858 prefixlen--; in addr2netmask() 2668 int prefixlen; in add_net_for_linkid() local 2671 prefixlen = ipv4_prefixlen( in add_net_for_linkid() [all …]
|
/titanic_44/usr/src/cmd/cmd-inet/usr.sbin/ipadm/ |
H A D | ipadm.c | 1640 int prefixlen; in print_sa_cb() local 1725 prefixlen = 0; in print_sa_cb() 1727 prefixlen = mask2plen(ifa->ifa_netmask); in print_sa_cb() 1729 if (prefixlen > 0) { in print_sa_cb() 1731 "/%d", prefixlen); in print_sa_cb()
|
/titanic_44/usr/src/cmd/cmd-inet/usr.sbin/ipsecutils/ |
H A D | ipsecconf.c | 2978 int prefixlen; in in_getprefixlen() local 2981 prefixlen = (int)strtol(mask, &end, 10); in in_getprefixlen() 2982 if (prefixlen < 0) { in in_getprefixlen() 2991 return (prefixlen); in in_getprefixlen() 2999 in_prefixlentomask(unsigned int prefixlen, uchar_t *mask) in in_prefixlentomask() argument 3001 while (prefixlen > 0) { in in_prefixlentomask() 3002 if (prefixlen >= 8) { in in_prefixlentomask() 3004 prefixlen -= 8; in in_prefixlentomask() 3007 *mask |= 1 << (8 - prefixlen); in in_prefixlentomask() 3008 prefixlen--; in in_prefixlentomask()
|
/titanic_44/usr/src/lib/libzfs/common/ |
H A D | libzfs_dataset.c | 3034 boolean_t accept_ancestor, int *prefixlen) in check_parents() argument 3105 if (prefixlen != NULL) in check_parents() 3106 *prefixlen = strlen(parent); in check_parents() 3140 create_parents(libzfs_handle_t *hdl, char *target, int prefixlen) in create_parents() argument 3147 cp = target + prefixlen; in create_parents() 3164 for (cp = target + prefixlen + 1; in create_parents()
|
/titanic_44/usr/src/cmd/zonecfg/ |
H A D | zonecfg.c | 3896 int prefixlen, i; in validate_net_address_syntax() local 3906 prefixlen = atoi(++slashp); in validate_net_address_syntax() 3920 prefixlen = IPV6_ABITS; in validate_net_address_syntax() 3926 if (prefixlen < 0 || prefixlen > 128) { in validate_net_address_syntax() 3936 prefixlen = IPV4_ABITS; in validate_net_address_syntax() 3938 if (prefixlen < 0 || prefixlen > 32) { in validate_net_address_syntax()
|
/titanic_44/usr/src/cmd/iscsiadm/ |
H A D | iscsiadm_main.c | 3713 int prefixlen = 0; in modifyNode() local 3761 prefixlen = strlen(ISCSI_IQN_NAME_PREFIX); in modifyNode() 3762 mb_name = (char *)calloc(1, prefixlen + 1); in modifyNode() 3768 prefixlen) == (size_t)-1) { in modifyNode() 3776 prefixlen) == 0) { in modifyNode()
|
/titanic_44/usr/src/lib/libipsecutil/common/ |
H A D | ipsec_util.c | 274 dump_sockaddr(struct sockaddr *sa, uint8_t prefixlen, boolean_t addr_only, in dump_sockaddr() argument 317 (void) snprintf(prefix, sizeof (prefix), "/%d", prefixlen); in dump_sockaddr() 319 if (prefixlen != 0) { in dump_sockaddr()
|
/titanic_44/usr/src/cmd/cmd-inet/usr.bin/netstat/ |
H A D | netstat.c | 158 uint_t prefixlen, char *dst, uint_t dstlen); 5830 pr_prefix6(const struct in6_addr *addr, uint_t prefixlen, char *dst, in pr_prefix6() argument 5835 if (IN6_IS_ADDR_UNSPECIFIED(addr) && prefixlen == 0) { in pr_prefix6() 5842 if (prefixlen != IPV6_ABITS) { in pr_prefix6() 5847 (void) snprintf(cp, dstlen, "/%d", prefixlen); in pr_prefix6()
|