Home
last modified time | relevance | path

Searched refs:mask4 (Results 1 – 12 of 12) sorted by relevance

/freebsd/sys/netinet/
H A Din_fib_algo.c76 uint32_t mask4; member
201 struct in_addr addr4, mask4; in bsearch4_add_route_cb() local
208 rt_get_inet_prefix_pmask(rt, &addr4, &mask4, &scopeid); in bsearch4_add_route_cb()
210 rr->mask4 = ntohl(mask4.s_addr); in bsearch4_add_route_cb()
237 if (rec1->mask4 < rec2->mask4) in rr_cmp()
239 else if (rec1->mask4 > rec2->mask4) in rr_cmp()
287 last_array_addr = (br_prev->addr4 | ~br_prev->mask4); in pop_stack_entry()
289 last_stack_addr = (pstack->addr4 | ~pstack->mask4); in pop_stack_entry()
300 .mask4 = pstack->mask4, in pop_stack_entry()
330 if (pst->addr4 == (rib_entry->addr4 & pst->mask4)) in bsearch4_process_record()
[all …]
H A Din_rmx.c57 const struct sockaddr_in *mask4 = (const struct sockaddr_in *)mask; in rib4_set_nh_pfxflags() local
76 } else if (mask4->sin_addr.s_addr == 0) in rib4_set_nh_pfxflags()
/freebsd/tests/sys/net/routing/
H A Dtest_rtsock_l3.c132 …gw->sin_addr.s_addr = htonl((ntohl(c->net4.sin_addr.s_addr) | ~ntohl(c->mask4.sin_addr.s_addr)) - … in prepare_v4_network()
279 (struct sockaddr *)&c->mask4, NULL); in ATF_TC_BODY()
294 (struct sockaddr *)&c->mask4, NULL); in ATF_TC_BODY()
338 (struct sockaddr *)&c->mask4, NULL); in ATF_TC_BODY()
368 (struct sockaddr *)&c->mask4, NULL); in ATF_TC_BODY()
393 (struct sockaddr *)&c->mask4, NULL); in ATF_TC_BODY()
418 struct sockaddr_in mask4; in ATF_TC_BODY() local
421 prepare_v4_network(c, &net4, &mask4, &gw4); in ATF_TC_BODY()
424 (struct sockaddr *)&mask4, (struct sockaddr *)&gw4); in ATF_TC_BODY()
437 (struct sockaddr *)&mask4, (struct sockaddr *)&gw4); in ATF_TC_BODY()
[all …]
H A Drtsock_config.h44 struct sockaddr_in mask4; member
93 sa_fill_mask4(&c->mask4, c->plen4); in config_setup()
/freebsd/usr.sbin/ppp/
H A Dncpaddr.c699 const struct sockaddr_in *mask4 = (const struct sockaddr_in *)mask; in ncprange_setsa() local
712 } else if (mask4 && mask4->sin_family == AF_INET) { in ncprange_setsa()
713 range->ncprange_ip4mask.s_addr = mask4->sin_addr.s_addr; in ncprange_setsa()
714 range->ncprange_ip4width = mask42bits(mask4->sin_addr); in ncprange_setsa()
742 struct sockaddr_in *mask4 = (struct sockaddr_in *)mask; in ncprange_getsa() local
757 if (mask4) { in ncprange_getsa()
758 mask4->sin_family = AF_INET; in ncprange_getsa()
759 mask4->sin_len = sizeof(*host4); in ncprange_getsa()
760 mask4->sin_addr = range->ncprange_ip4mask; in ncprange_getsa()
/freebsd/sys/netpfil/ipfw/
H A Dip_fw_table_algo.c929 uint8_t mask4; member
1203 int mask4, mask6; in chash_parse_opts() local
1205 mask4 = cfg->mask4; in chash_parse_opts()
1223 mask4 = strtol(pdel, &pend, 10); in chash_parse_opts()
1235 if (mask4 < 0 || mask4 > 32 || mask6 < 0 || mask6 > 128) in chash_parse_opts()
1238 cfg->mask4 = mask4; in chash_parse_opts()
1252 if (cfg->mask4 != 32 || cfg->mask6 != 128) in ta_print_chash_config()
1254 cfg->mask4, cfg->mask6); in ta_print_chash_config()
1286 cfg->mask4 = 32; in ta_init_chash()
1313 ti->data = (32 - cfg->mask4) << 24 | (128 - cfg->mask6) << 16| in ta_init_chash()
[all …]
/freebsd/sys/net/route/
H A Droute_helpers.c521 struct in_addr mask4; in rt_get_inet_parent() local
526 mask4.s_addr = htonl(plen ? ~((1 << (32 - plen)) - 1) : 0); in rt_get_inet_parent()
527 addr4.s_addr = htonl(ntohl(addr4.s_addr) & ntohl(mask4.s_addr)); in rt_get_inet_parent()
/freebsd/sbin/route/
H A Droute_netlink.c186 struct sockaddr_in *mask4 = (struct sockaddr_in *)mask; in rtmsg_nl_int() local
188 if ((rtm_flags & RTF_HOST) == 0 && mask4 != NULL) in rtmsg_nl_int()
189 plen = bitcount32(mask4->sin_addr.s_addr); in rtmsg_nl_int()
/freebsd/sbin/ipfw/
H A Dnat64lsn.c320 struct in_addr mask4, *p4; in nat64lsn_apply_mask() local
324 mask4.s_addr = htonl(~((1 << (32 - plen)) - 1)); in nat64lsn_apply_mask()
325 p4->s_addr &= mask4.s_addr; in nat64lsn_apply_mask()
/freebsd/sys/netpfil/ipfw/nat64/
H A Dnat64lsn_control.c117 uint32_t addr4, mask4; in nat64lsn_create() local
146 mask4 = ~((1 << (32 - uc->plen4)) - 1); in nat64lsn_create()
147 if ((addr4 & mask4) != addr4) in nat64lsn_create()
/freebsd/sys/net/
H A Drtsock.c842 struct sockaddr_in *mask4 = (struct sockaddr_in *)mask; in init_sockaddrs_family() local
845 bzero(mask4, sizeof(struct sockaddr_in)); in init_sockaddrs_family()
849 mask4->sin_family = AF_INET; in init_sockaddrs_family()
850 mask4->sin_len = sizeof(struct sockaddr_in); in init_sockaddrs_family()
876 struct sockaddr_in *mask4 = (struct sockaddr_in *)mask; in export_rtaddrs() local
878 rt_get_inet_prefix_pmask(rt, &dst4->sin_addr, &mask4->sin_addr, in export_rtaddrs()
/freebsd/contrib/wireguard-tools/
H A Dcurve25519-hacl64.h700 u64 mask4 = u64_eq_mask(a4, 0x7ffffffffffffLLU); in format_fcontract_trim() local
701 u64 mask = (((mask0 & mask1) & mask2) & mask3) & mask4; in format_fcontract_trim()