/src/sys/net/npf/ |
npf_connkey.c | 41 * | alen | proto | ckey | src-id | dst-id | src-addr | dst-addr | 47 * the 'alen' field. The length is in words and is either 1 or 4, 85 npf_connkey_setkey(npf_connkey_t *key, unsigned alen, unsigned proto, 101 KASSERT((alen >> 2) <= 0xf && proto <= 0xff); 102 k[0] = ((uint32_t)(alen >> 2) << 28) | (proto << 20); 105 if (__predict_true(alen == sizeof(in_addr_t))) { 110 const unsigned nwords = alen >> 2; 111 memcpy(&k[2], ips[isrc], alen); 112 memcpy(&k[2 + nwords], ips[idst], alen); 118 npf_connkey_getkey(const npf_connkey_t *key, unsigned *alen, unsigned *proto 183 const unsigned alen = NPF_CONNKEY_ALEN(key); local in function:npf_conn_adjkey 207 const unsigned alen = NPF_CONNKEY_ALEN(skey); local in function:npf_connkey_copy 232 const unsigned alen = npc->npc_alen; local in function:npf_conn_conkey 316 unsigned alen, proto, ifid, di; local in function:npf_connkey_export 383 unsigned alen, proto, ifid, di; local in function:npf_connkey_print [all...] |
npf_ifaddr.c | 130 int alen = 0; local in function:npf_ifaddr_sync 134 alen = sizeof(struct in_addr); 139 alen = sizeof(struct in6_addr); 142 if (alen) { 144 memcpy(&addr, p, alen); 145 npf_table_insert(t, alen, &addr, NPF_NO_NETMASK);
|
npf_tableset.c | 74 #define NPF_ADDRLEN2IDX(alen) ((alen) >> 4) 496 table_ifaddr_insert(npf_table_t *t, const int alen, npf_tblent_t *ent) 498 const unsigned aidx = NPF_ADDRLEN2IDX(alen); 537 npf_table_insert(npf_table_t *t, const int alen, 543 error = npf_netmask_check(alen, mask); 548 memcpy(&ent->te_addr, addr, alen); 549 ent->te_alen = alen; 568 if (thmap_put(t->t_map, &ent->te_addr, alen, ent) == ent) { 577 (mask == NPF_NO_NETMASK) ? (alen * 8) : mask [all...] |
npf_inet.c | 128 npf_addr_mix(const int alen, const npf_addr_t *a1, const npf_addr_t *a2) 130 const int nwords = alen >> 2; 133 KASSERT(alen > 0 && a1 != NULL && a2 != NULL); 147 const int alen, npf_addr_t *out) 149 const int nwords = alen >> 2; 177 const int alen, npf_addr_t *out) 179 const int nwords = alen >> 2; 209 const npf_addr_t *addr2, const npf_netmask_t mask2, const int alen) 214 npf_addr_mask(addr1, mask1, alen, &realaddr1); 218 npf_addr_mask(addr2, mask2, alen, &realaddr2) 750 const int alen = npc->npc_alen; local in function:npf_rwrcksum [all...] |
npf_portmap.c | 433 npf_portmap_autoget(npf_portmap_t *pm, unsigned alen, const npf_addr_t *addr) 438 KASSERT(alen && alen <= sizeof(npf_addr_t)); 441 bm = thmap_get(pm->addr_map, addr, alen); 453 memcpy(&bm->addr, addr, alen); 454 bm->addr_len = alen; 457 ret = thmap_put(pm->addr_map, &bm->addr, alen, bm); 510 npf_portmap_get(npf_portmap_t *pm, int alen, const npf_addr_t *addr) 523 bm = npf_portmap_autoget(pm, alen, addr); 550 npf_portmap_take(npf_portmap_t *pm, int alen, [all...] |
npf_nat.c | 448 npf_nat_getaddr(npf_cache_t *npc, npf_natpolicy_t *np, const unsigned alen) 463 idx = npf_addr_mix(alen, 468 return npf_table_getsome(t, alen, idx); 480 const unsigned alen = npc->npc_alen; local in function:npf_nat_create 514 taddr = npf_nat_getaddr(npc, np, alen); 520 memcpy(&nt->nt_taddr, taddr, alen); 530 memcpy(&nt->nt_taddr, taddr, alen); 532 nt->nt_alen = alen; 537 memcpy(&nt->nt_oaddr, npc->npc_ips[NPF_SRC], alen); 541 memcpy(&nt->nt_oaddr, npc->npc_ips[NPF_DST], alen); 904 unsigned alen = nt->nt_alen; local in function:npf_nat_export 936 size_t alen, len; local in function:npf_nat_import [all...] |
npf_bpf.c | 111 const u_int alen = npc->npc_alen; local in function:npf_bpf_prepare 112 const uint32_t ver = (alen & 4) | ((alen >> 4) * 6);
|
npf_conn.c | 47 * - npf_conn_getbackkey(con, alen) -- for the backwards stream. 129 #define NPF_CONNCACHE(alen) (((alen) >> 4) & 0x1) 427 const unsigned alen = npc->npc_alen; local in function:npf_conn_establish 428 const unsigned idx = NPF_CONNCACHE(alen); 458 con->c_alen = alen; 468 bk = npf_conn_getbackkey(con, alen); 815 unsigned flags, alen; local in function:npf_conn_export 831 alen = NPF_CONNKEY_ALEN(fw); 832 KASSERT(alen == con->c_alen) 861 unsigned flags, alen, idx; local in function:npf_conn_import [all...] |
/src/usr.sbin/npf/npftest/libnpftest/ |
npf_table_test.c | 69 const int alen = sizeof(struct in_addr); local in function:check_ip4 71 return memcmp(addr, test_addr, alen) == 0; 78 const int alen = sizeof(struct in_addr); local in function:ip4list_insert_lookup 82 error = npf_table_insert(t, alen, addr, NPF_NO_NETMASK); 84 error = npf_table_lookup(t, alen, addr); 93 const int alen = sizeof(struct in_addr); local in function:fill_with_ip4 103 error = npf_table_insert(t, alen, addr, nm); 105 error = npf_table_insert(t, alen, addr, nm); 109 error = npf_table_insert(t, alen, addr, nm); 111 error = npf_table_insert(t, alen, addr, nm) 121 const size_t alen = sizeof(struct in_addr); local in function:verify_ip4 156 const int alen = sizeof(struct in_addr); local in function:clear_ip4 188 const int alen = sizeof(struct in_addr); local in function:test_basic 233 const int alen = sizeof(struct in_addr); local in function:test_nocopy 267 const size_t alen = sizeof(struct in6_addr); local in function:test_ip6 299 const size_t alen = sizeof(struct in_addr); local in function:test_lpm_masks4 322 const size_t alen = sizeof(struct in6_addr); local in function:test_lpm_masks6 377 const int alen = sizeof(struct in_addr); local in function:test_const_table [all...] |
/src/lib/libc/gen/ |
extattr.c | 103 size_t alen; local in function:extattr_copy_fd 133 for (i = 0; i < (size_t)llen; i += alen + 1) { 137 alen = ((uint8_t *)alist)[i]; 139 (void)memcpy(aname, ap, alen); 140 aname[alen] = '\0'; 173 size_t alen; local in function:extattr_copy_file 203 for (i = 0; i < (size_t)llen; i += alen + 1) { 207 alen = ((uint8_t *)alist)[i]; 209 (void)memcpy(aname, ap, alen); 210 aname[alen] = '\0' 243 size_t alen; local in function:extattr_copy_link [all...] |
/src/usr.sbin/npf/npfctl/ |
npf_cmd.c | 309 int n, alen; local in function:npfctl_table 348 if (!npfctl_parse_cidr(arg, &fam, &alen)) { 351 nct.nct_data.ent.alen = alen; 352 memcpy(&nct.nct_data.ent.addr, &fam.fam_addr, alen); 385 if (!ent->alen) 387 buf = npfctl_print_addrmask(ent->alen, "%a", 407 unsigned alen; member in struct:__anon353fbb410108 418 npfctl_conn_print(unsigned alen, const npf_addr_t *a, const in_port_t *p, 431 if (alen != fil->alen) 485 unsigned alen = 0; local in function:npfctl_conn_list [all...] |
/src/tests/rump/rumpkern/ |
t_modcmd.c | 67 size_t alen; local in function:disable_autoload 73 alen = sizeof(ans); 78 if (rump_sys___sysctl(mib, 2, ans, &alen, &q, sizeof(q)) == -1) 92 if (rump_sys___sysctl(mib, 3, ans, &alen, &q, sizeof(q)) == -1) 106 alen = 0; 107 if (rump_sys___sysctl(mib, 3, NULL, &alen, &no, sizeof(no)) == -1)
|
/src/lib/libc/net/ |
getifaddrs.c | 89 size_t len, alen; local in function:__weak_alias 136 alen = 0; 144 alen = len; 156 dcnt += alen; 231 alen = 0; 239 alen = len; 264 memset(data, 0, alen); 265 data += alen;
|
/src/bin/sh/ |
memalloc.c | 357 size_t len, tlen = 0, alen[8]; local in function:ststrcat 366 if (n < sizeof(alen)/sizeof(alen[0])) 367 alen[n++] = len; 386 if (n < sizeof(alen)/sizeof(alen[0])) 387 len = alen[n++];
|
/src/usr.sbin/npf/npftest/ |
npftest.c | 135 int alen, fd; local in function:generate_test_cdb 147 addr = inet_addr("192.168.1.1"), alen = sizeof(struct in_addr); 148 if (cdbw_put(cdbw, &addr, alen, &addr, alen) == -1) 151 addr = inet_addr("10.0.0.2"), alen = sizeof(struct in_addr); 152 if (cdbw_put(cdbw, &addr, alen, &addr, alen) == -1)
|
/src/lib/libwrap/ |
hosts_access.c | 475 size_t alen; local in function:masked_match6 518 alen = sizeof(mask.sin.sin_addr); 522 alen = sizeof(mask.sin6.sin6_addr); 527 if (masklen / 8 > alen) 570 alen = sizeof(net.sin.sin_addr); 576 alen = sizeof(net.sin6.sin6_addr); 582 for (i = 0; i < alen; i++) 588 for (i = 0; i < alen; i++) 594 return (memcmp(ap, np, alen) == 0);
|
/src/libexec/httpd/ |
auth-bozo.c | 154 ssize_t alen; local in function:bozo_auth_check_headers 160 alen = base64_decode((unsigned char *)str + 6, 164 if (alen != -1) 165 authbuf[alen] = '\0'; 166 if (alen == -1 ||
|
/src/tests/net/if_loop/ |
t_pr.c | 120 size_t alen; local in function:enable_locsums 127 alen = sizeof(ans); 132 if (rump_sys___sysctl(mib, 4, ans, &alen, &q, sizeof(q)) == -1)
|
/src/sys/netipsec/ |
xform_esp.c | 306 int plen, alen, hlen, error, stat = ESP_STAT_CRYPTO; local in function:esp_input 338 alen = esph ? esph->authsize : 0; 347 plen = m->m_pkthdr.len - (skip + hlen + alen); 384 size_t extra __diagused = esph == NULL ? 0 : alen; 412 crda->crd_len = m->m_pkthdr.len - (skip + alen); 413 crda->crd_inject = m->m_pkthdr.len - alen; 426 m_copydata(m, m->m_pkthdr.len - alen, alen, (tc + 1)); 472 crde->crd_len = m->m_pkthdr.len - (skip + hlen + alen); 684 int hlen, rlen, tlen, padlen, blks, alen, i, roff local in function:esp_output [all...] |
/src/sys/compat/linux/common/ |
linux_socketcall.h | 201 syscallarg(int *) alen; 209 syscallarg(int *) alen;
|
/src/sys/compat/linux32/common/ |
linux32_socketcall.h | 124 syscallarg(netbsd32_intp) alen; 130 syscallarg(netbsd32_intp) alen;
|
/src/lib/libc/rpc/ |
svc_dg.c | 190 socklen_t alen; local in function:svc_dg_recv 201 alen = sizeof (struct sockaddr_storage); 203 (struct sockaddr *)(void *)&ss, &alen); 208 if (xprt->xp_rtaddr.len < alen) { 211 xprt->xp_rtaddr.buf = mem_alloc(alen); 212 xprt->xp_rtaddr.len = alen; 214 memcpy(xprt->xp_rtaddr.buf, &ss, alen); 230 (struct sockaddr *)(void *)&ss, alen);
|
/src/usr.bin/login/ |
common.c | 171 socklen_t alen; local in function:update_db 176 alen = sizeof(ass); 177 if (getpeername(STDIN_FILENO, (struct sockaddr *)&ass, &alen) != -1) { 184 if (memcmp(&ass, &ss, alen) != 0)
|
/src/lib/libukfs/ |
ukfs.c | 531 const char *mountpath, int mntflags, void *arg, size_t alen) 587 mi.mi_alen = alen; 610 rv = rump_sys_mount(vfsname, mountpath, mntflags, arg, alen); 661 const char *mountpath, int mntflags, void *arg, size_t alen) 665 mountpath, mntflags, arg, alen); 671 void *arg, size_t alen) 675 mountpath, mntflags, arg, alen); 1282 size_t alen; local in function:ukfs_vfstypes 1288 alen = sizeof(ans); 1293 if (rump_sys___sysctl(mib, 3, ans, &alen, &q, sizeof(q)) == -1) [all...] |
/src/lib/libpthread/ |
pthread_tsd.c | 89 size_t alen; local in function:pthread_tsd_init 113 alen = *tlen 117 arena = mmap(NULL, alen, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0);
|