Home
last modified time | relevance | path

Searched refs:addr_len (Results 1 – 25 of 290) sorted by relevance

12345678910>>...12

/linux-6.6.21/net/core/
Ddev_addr_lists.c22 struct netdev_hw_addr *new, int addr_len) in __hw_addr_insert() argument
31 diff = memcmp(new->addr, ha->addr, addr_len); in __hw_addr_insert()
51 __hw_addr_create(const unsigned char *addr, int addr_len, in __hw_addr_create() argument
63 memcpy(ha->addr, addr, addr_len); in __hw_addr_create()
74 const unsigned char *addr, int addr_len, in __hw_addr_add_ex() argument
81 if (addr_len > MAX_ADDR_LEN) in __hw_addr_add_ex()
88 diff = memcmp(addr, ha->addr, addr_len); in __hw_addr_add_ex()
118 ha = __hw_addr_create(addr, addr_len, addr_type, global, sync); in __hw_addr_add_ex()
132 const unsigned char *addr, int addr_len, in __hw_addr_add() argument
135 return __hw_addr_add_ex(list, addr, addr_len, addr_type, false, false, in __hw_addr_add()
[all …]
/linux-6.6.21/net/ceph/
Ddecode.c15 u32 struct_len, addr_len; in ceph_decode_entity_addr_versioned() local
30 ceph_decode_32_safe(p, end, addr_len, bad); in ceph_decode_entity_addr_versioned()
31 if (addr_len > sizeof(addr->in_addr)) in ceph_decode_entity_addr_versioned()
35 if (addr_len) { in ceph_decode_entity_addr_versioned()
36 ceph_decode_copy_safe(p, end, &addr->in_addr, addr_len, bad); in ceph_decode_entity_addr_versioned()
173 int addr_len = get_sockaddr_encoding_len(family); in ceph_entity_addr_encoding_len() local
175 return 1 + CEPH_ENCODING_START_BLK_LEN + 4 + 4 + 4 + addr_len; in ceph_entity_addr_encoding_len()
181 int addr_len = get_sockaddr_encoding_len(family); in ceph_encode_entity_addr() local
186 sizeof(u32) + addr_len); in ceph_encode_entity_addr()
190 ceph_encode_32(p, addr_len); in ceph_encode_entity_addr()
[all …]
/linux-6.6.21/include/net/
Dinet_common.h27 int addr_len, int flags);
29 int addr_len, int flags, int is_sendmsg);
31 int addr_len, int flags);
45 int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len);
46 int inet_bind_sk(struct sock *sk, struct sockaddr *uaddr, int addr_len);
55 int __inet_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len,
64 int *addr_len);
Dping.h24 int *addr_len);
62 int ping_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len);
68 int flags, int *addr_len);
Dndisc.h329 static inline int __ndisc_opt_addr_space(unsigned char addr_len, int pad) in __ndisc_opt_addr_space() argument
331 return NDISC_OPT_SPACE(addr_len + pad); in __ndisc_opt_addr_space()
337 return __ndisc_opt_addr_space(dev->addr_len, in ndisc_opt_addr_space()
347 return __ndisc_opt_addr_space(dev->addr_len, in ndisc_redirect_opt_addr_space()
355 unsigned char addr_len, int prepad) in __ndisc_opt_addr_data() argument
359 if (lladdrlen != __ndisc_opt_addr_space(addr_len, prepad)) in __ndisc_opt_addr_data()
367 return __ndisc_opt_addr_data(p, dev->addr_len, in ndisc_opt_addr_data()
/linux-6.6.21/net/ipv4/
Dudp_bpf.c14 int flags, int *addr_len) in sk_udp_recvmsg() argument
18 return udpv6_prot_saved->recvmsg(sk, msg, len, flags, addr_len); in sk_udp_recvmsg()
20 return udp_prot.recvmsg(sk, msg, len, flags, addr_len); in sk_udp_recvmsg()
63 int flags, int *addr_len) in udp_bpf_recvmsg() argument
69 return inet_recv_error(sk, msg, len, addr_len); in udp_bpf_recvmsg()
76 return sk_udp_recvmsg(sk, msg, len, flags, addr_len); in udp_bpf_recvmsg()
79 ret = sk_udp_recvmsg(sk, msg, len, flags, addr_len); in udp_bpf_recvmsg()
94 ret = sk_udp_recvmsg(sk, msg, len, flags, addr_len); in udp_bpf_recvmsg()
Ddatagram.c19 int __ip4_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) in __ip4_datagram_connect() argument
30 if (addr_len < sizeof(*usin)) in __ip4_datagram_connect()
85 int ip4_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) in ip4_datagram_connect() argument
90 res = __ip4_datagram_connect(sk, uaddr, addr_len); in ip4_datagram_connect()
Daf_inet.c443 int inet_bind_sk(struct sock *sk, struct sockaddr *uaddr, int addr_len) in inet_bind_sk() argument
450 return sk->sk_prot->bind(sk, uaddr, addr_len); in inet_bind_sk()
452 if (addr_len < sizeof(struct sockaddr_in)) in inet_bind_sk()
458 err = BPF_CGROUP_RUN_PROG_INET_BIND_LOCK(sk, uaddr, &addr_len, in inet_bind_sk()
463 return __inet_bind(sk, uaddr, addr_len, flags); in inet_bind_sk()
466 int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) in inet_bind() argument
468 return inet_bind_sk(sock->sk, uaddr, addr_len); in inet_bind()
472 int __inet_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len, in __inet_bind() argument
570 int addr_len, int flags) in inet_dgram_connect() argument
576 if (addr_len < sizeof(uaddr->sa_family)) in inet_dgram_connect()
[all …]
/linux-6.6.21/security/tomoyo/
Dnetwork.c21 unsigned int addr_len; member
502 const unsigned int addr_len, in tomoyo_check_inet_address() argument
508 if (addr_len < offsetofend(struct sockaddr, sa_family)) in tomoyo_check_inet_address()
512 if (addr_len < SIN6_LEN_RFC2133) in tomoyo_check_inet_address()
520 if (addr_len < sizeof(struct sockaddr_in)) in tomoyo_check_inet_address()
554 int len = address->unix0.addr_len - sizeof(sa_family_t); in tomoyo_unix_entry()
594 const unsigned int addr_len, in tomoyo_check_unix_address() argument
599 if (addr_len < offsetofend(struct sockaddr, sa_family)) in tomoyo_check_unix_address()
604 u->addr_len = addr_len; in tomoyo_check_unix_address()
656 int addr_len; in tomoyo_socket_listen_permission() local
[all …]
/linux-6.6.21/net/netlabel/
Dnetlabel_unlabeled.c368 u32 addr_len, in netlbl_unlhsh_add() argument
380 if (addr_len != sizeof(struct in_addr) && in netlbl_unlhsh_add()
381 addr_len != sizeof(struct in6_addr)) in netlbl_unlhsh_add()
406 switch (addr_len) { in netlbl_unlhsh_add()
630 u32 addr_len, in netlbl_unlhsh_remove() argument
637 if (addr_len != sizeof(struct in_addr) && in netlbl_unlhsh_remove()
638 addr_len != sizeof(struct in6_addr)) in netlbl_unlhsh_remove()
655 switch (addr_len) { in netlbl_unlhsh_remove()
767 u32 addr_len; in netlbl_unlabel_addrinfo_get() local
771 addr_len = nla_len(info->attrs[NLBL_UNLABEL_A_IPV4ADDR]); in netlbl_unlabel_addrinfo_get()
[all …]
/linux-6.6.21/tools/testing/selftests/bpf/
Dtest_sock_addr.c607 struct sockaddr *addr, socklen_t addr_len) in mk_sockaddr() argument
617 memset(addr, 0, addr_len); in mk_sockaddr()
620 if (addr_len < sizeof(struct sockaddr_in)) in mk_sockaddr()
630 if (addr_len < sizeof(struct sockaddr_in6)) in mk_sockaddr()
942 socklen_t addr_len) in start_server() argument
952 if (bind(fd, (const struct sockaddr *)addr, addr_len) == -1) { in start_server()
973 socklen_t addr_len) in connect_to_server() argument
991 if (connect(fd, (const struct sockaddr *)addr, addr_len) == -1) { in connect_to_server()
1035 socklen_t addr_len, int set_cmsg, int flags, in sendmsg_to_server() argument
1071 hdr.msg_namelen = addr_len; in sendmsg_to_server()
[all …]
/linux-6.6.21/net/802/
Dfc.c62 memcpy(fch->saddr,saddr,dev->addr_len); in fc_header()
64 memcpy(fch->saddr,dev->dev_addr,dev->addr_len); in fc_header()
68 memcpy(fch->daddr,daddr,dev->addr_len); in fc_header()
84 dev->addr_len = FC_ALEN; in fc_setup()
Dfddi.c73 memcpy(fddi->saddr, saddr, dev->addr_len); in fddi_header()
75 memcpy(fddi->saddr, dev->dev_addr, dev->addr_len); in fddi_header()
79 memcpy(fddi->daddr, daddr, dev->addr_len); in fddi_header()
153 dev->addr_len = FDDI_K_ALEN; in fddi_setup()
/linux-6.6.21/drivers/char/ipmi/
Dipmi_devintf.c149 if (req->addr_len > sizeof(struct ipmi_addr)) in handle_send_req()
152 if (copy_from_user(&addr, req->addr, req->addr_len)) in handle_send_req()
165 rv = ipmi_validate_addr(&addr, req->addr_len); in handle_send_req()
203 int addr_len; in handle_recv() local
231 addr_len = ipmi_addr_length(msg->addr.addr_type); in handle_recv()
232 if (rsp->addr_len < addr_len) { in handle_recv()
237 if (copy_to_user(rsp->addr, &msg->addr, addr_len)) { in handle_recv()
241 rsp->addr_len = addr_len; in handle_recv()
642 compat_uint_t addr_len; member
650 compat_uint_t addr_len; member
[all …]
/linux-6.6.21/fs/nfsd/
Dflexfilelayoutxdr.c85 int addr_len; in nfsd4_ff_encode_getdeviceinfo() local
98 addr_len = 16 + da->netaddr.netid_len + da->netaddr.addr_len; in nfsd4_ff_encode_getdeviceinfo()
101 len = 4 + ver_len + 4 + addr_len; in nfsd4_ff_encode_getdeviceinfo()
114 p = xdr_encode_opaque(p, da->netaddr.addr, da->netaddr.addr_len); in nfsd4_ff_encode_getdeviceinfo()
/linux-6.6.21/drivers/nvmem/
Drockchip-efuse.c99 unsigned int addr_start, addr_end, addr_offset, addr_len; in rockchip_rk3328_efuse_read() local
115 addr_len = addr_end - addr_start; in rockchip_rk3328_efuse_read()
117 buf = kzalloc(array3_size(addr_len, RK3399_NBYTES, sizeof(*buf)), in rockchip_rk3328_efuse_read()
124 while (addr_len--) { in rockchip_rk3328_efuse_read()
154 unsigned int addr_start, addr_end, addr_offset, addr_len; in rockchip_rk3399_efuse_read() local
168 addr_len = addr_end - addr_start; in rockchip_rk3399_efuse_read()
170 buf = kzalloc(array3_size(addr_len, RK3399_NBYTES, sizeof(*buf)), in rockchip_rk3399_efuse_read()
180 while (addr_len--) { in rockchip_rk3399_efuse_read()
/linux-6.6.21/tools/testing/selftests/net/
Dip_local_port_range.c50 socklen_t addr_len; in bind_to_loopback_any_port() local
58 addr_len = sizeof(addr.v4); in bind_to_loopback_any_port()
64 addr_len = sizeof(addr.v6); in bind_to_loopback_any_port()
70 return bind(fd, &addr.sa, addr_len); in bind_to_loopback_any_port()
80 socklen_t addr_len; in get_sock_port() local
83 addr_len = sizeof(addr); in get_sock_port()
85 err = getsockname(fd, &addr.sa, &addr_len); in get_sock_port()
346 socklen_t addr_len; in TEST_F() local
378 addr_len = sizeof(addr.v4); in TEST_F()
384 addr_len = sizeof(addr.v6); in TEST_F()
[all …]
Dtcp_inq.c33 static socklen_t addr_len = sizeof(struct sockaddr_in6); variable
112 addr_len = sizeof(struct sockaddr_in); in main()
116 addr_len = sizeof(struct sockaddr_in6); in main()
132 addr_len) == -1) in main()
144 if (connect(fd, (const struct sockaddr *)&addr, addr_len) == -1) in main()
Dtoeplitz.c153 const char *addrs, int addr_len) in log_rxhash() argument
159 !inet_ntop(cfg_family, addrs + addr_len, daddr, sizeof(daddr))) in log_rxhash()
162 ports = (void *)addrs + (addr_len * 2); in log_rxhash()
174 int addr_len; in verify_rxhash() local
177 addr_len = sizeof(struct in_addr); in verify_rxhash()
180 addr_len = sizeof(struct in6_addr); in verify_rxhash()
184 memcpy(four_tuple, addrs, (addr_len * 2) + (sizeof(uint16_t) * 2)); in verify_rxhash()
188 log_rxhash(cpu, rx_hash, addrs, addr_len); in verify_rxhash()
/linux-6.6.21/drivers/staging/rtl8192u/
Dr8180_93cx6.c110 int addr_len; in eprom_read() local
130 addr_len = 8; in eprom_read()
138 addr_len = 6; in eprom_read()
143 eprom_send_bits_string(dev, addr_str, addr_len); in eprom_read()
/linux-6.6.21/net/netrom/
Dnr_dev.c71 memcpy(buff, (saddr != NULL) ? saddr : dev->dev_addr, dev->addr_len); in nr_header()
78 memcpy(buff, daddr, dev->addr_len); in nr_header()
103 if (!memcmp(dev->dev_addr, sa->sa_data, dev->addr_len)) in nr_set_mac_address()
173 dev->addr_len = AX25_ADDR_LEN; in nr_setup()
/linux-6.6.21/net/rose/
Drose_dev.c42 memcpy(buff + 7, daddr, dev->addr_len); in rose_header()
61 if (!memcmp(dev->dev_addr, sa->sa_data, dev->addr_len)) in rose_set_mac_address()
136 dev->addr_len = ROSE_ADDR_LEN; in rose_setup()
/linux-6.6.21/net/l2tp/
Dl2tp_ip6.c259 static int l2tp_ip6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len) in l2tp_ip6_bind() argument
272 if (addr_len < sizeof(*addr)) in l2tp_ip6_bind()
360 int addr_len) in l2tp_ip6_connect() argument
368 if (addr_len < sizeof(*lsa)) in l2tp_ip6_connect()
392 rc = __ip6_datagram_connect(sk, uaddr, addr_len); in l2tp_ip6_connect()
500 int addr_len = msg->msg_namelen; in l2tp_ip6_sendmsg() local
524 if (addr_len < SIN6_LEN_RFC2133) in l2tp_ip6_sendmsg()
547 if (addr_len >= sizeof(struct sockaddr_in6) && in l2tp_ip6_sendmsg()
658 int flags, int *addr_len) in l2tp_ip6_recvmsg() argument
670 return ipv6_recv_error(sk, msg, len, addr_len); in l2tp_ip6_recvmsg()
[all …]
/linux-6.6.21/include/linux/
Dif_arp.h36 return sizeof(struct arphdr) + dev->addr_len + sizeof(u32) * 2; in arp_hdr_len()
40 return sizeof(struct arphdr) + (dev->addr_len + sizeof(u32)) * 2; in arp_hdr_len()
/linux-6.6.21/fs/dlm/
Dlowcomms.c164 struct sockaddr *addr, int addr_len);
662 int *addr_len) in make_sockaddr() argument
668 *addr_len = sizeof(struct sockaddr_in); in make_sockaddr()
673 *addr_len = sizeof(struct sockaddr_in6); in make_sockaddr()
675 memset((char *)saddr + *addr_len, 0, sizeof(struct sockaddr_storage) - *addr_len); in make_sockaddr()
1124 int i, addr_len, result = 0; in sctp_bind_addrs() local
1128 make_sockaddr(&localaddr, port, &addr_len); in sctp_bind_addrs()
1131 result = kernel_bind(sock, addr, addr_len); in sctp_bind_addrs()
1133 result = sock_bind_add(sock->sk, addr, addr_len); in sctp_bind_addrs()
1551 int result, addr_len; in dlm_connect() local
[all …]

12345678910>>...12