Home
last modified time | relevance | path

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

12345678910>>...15

/kernel/linux/common_modules/newip/src/common/
Dnip_addr.c148 unsigned char third_byte, int addr_len) in nip_addr_1byte_check() argument
152 if (is_1byte_addr_flag(first_byte) && addr_len == NIP_ADDR_LEN_1) in nip_addr_1byte_check()
168 unsigned char third_byte, int addr_len) in nip_addr_2byte_check() argument
172 if (is_2byte_addr_flag(first_byte) && addr_len == NIP_ADDR_LEN_2) { in nip_addr_2byte_check()
189 unsigned char third_byte, int addr_len) in nip_addr_3byte_check() argument
193 if (is_3byte_addr_flag(first_byte) && addr_len == NIP_ADDR_LEN_3) { in nip_addr_3byte_check()
209 unsigned char third_byte, int addr_len) in nip_addr_5byte_check() argument
213 if (is_5byte_addr_flag(first_byte) && addr_len == NIP_ADDR_LEN_5) { in nip_addr_5byte_check()
229 unsigned char third_byte, int addr_len) in nip_addr_7byte_check() argument
233 if (is_7byte_addr_flag(first_byte) && addr_len == NIP_ADDR_LEN_7) { in nip_addr_7byte_check()
[all …]
Dnip_checksum.c36 int addr_len; in _nip_header_chksum() local
40 addr_len = chksum_header->saddr.bitlen / NIP_ADDR_BIT_LEN_8; in _nip_header_chksum()
41 if (addr_len && addr_len < NIP_HDR_MAX) { in _nip_header_chksum()
43 for (i = 0; i < addr_len; i++, j++) in _nip_header_chksum()
45 hdr_len += addr_len; in _nip_header_chksum()
48 addr_len = chksum_header->daddr.bitlen / NIP_ADDR_BIT_LEN_8; in _nip_header_chksum()
49 if (addr_len && addr_len < NIP_HDR_MAX) { in _nip_header_chksum()
51 for (i = 0; i < addr_len; i++, j++) in _nip_header_chksum()
53 hdr_len += addr_len; in _nip_header_chksum()
/kernel/linux/linux-5.10/net/core/
Ddev_addr_lists.c20 const unsigned char *addr, int addr_len, in __hw_addr_create_ex() argument
33 memcpy(ha->addr, addr, addr_len); in __hw_addr_create_ex()
46 const unsigned char *addr, int addr_len, in __hw_addr_add_ex() argument
52 if (addr_len > MAX_ADDR_LEN) in __hw_addr_add_ex()
57 !memcmp(ha->addr, addr, addr_len)) { in __hw_addr_add_ex()
76 return __hw_addr_create_ex(list, addr, addr_len, addr_type, global, in __hw_addr_add_ex()
81 const unsigned char *addr, int addr_len, in __hw_addr_add() argument
84 return __hw_addr_add_ex(list, addr, addr_len, addr_type, false, false, in __hw_addr_add()
113 const unsigned char *addr, int addr_len, in __hw_addr_del_ex() argument
119 if (!memcmp(ha->addr, addr, addr_len) && in __hw_addr_del_ex()
[all …]
/kernel/linux/common_modules/newip/examples/
Dnip_addr_cfg_demo.c27 int nip_add_addr(int ifindex, const unsigned char *addr, unsigned char addr_len) in nip_add_addr() argument
37 ifrn.ifrn_addr.bitlen = addr_len * BITS_PER_BYTE; // Byte length is converted to bit length in nip_add_addr()
38 memcpy(ifrn.ifrn_addr.NIP_ADDR_FIELD8, addr, addr_len); in nip_add_addr()
62 unsigned char addr_len; in main() local
69 addr_len = sizeof(server_addr); in main()
73 addr_len = sizeof(client_addr); in main()
87 ret = nip_add_addr(ifindex, addr, addr_len); in main()
Dnip_tcp_server_demo.c56 int fd, cfd, addr_len; in main() local
87 addr_len = sizeof(si_remote); in main()
89 cfd = accept(fd, (struct sockaddr *)&si_remote, (socklen_t *)&addr_len); in main()
/kernel/linux/linux-5.10/include/net/
Dinet_common.h21 int addr_len, int flags);
23 int addr_len, int flags, int is_sendmsg);
25 int addr_len, int flags);
37 int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len);
44 int __inet_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len,
53 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()
/kernel/linux/linux-5.10/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 …]
/kernel/linux/common_modules/newip/tools/
Dwireshark_cfg_for_newip.lua227 local addr_len = get_nip_addr_len (first_addr)
228 if addr_len == 0 then
231 nip_tree:add(_daddr, tvb(offset, addr_len))
232 offset = offset + addr_len --_daddr 占用 addr_len 字节
237 local addr_len = get_nip_addr_len (first_addr)
238 if addr_len == 0 then
241 nip_tree:add(_saddr, tvb(offset, addr_len))
242 offset = offset + addr_len --_daddr 占用 addr_len 字节
263 local addr_len = get_nip_addr_len (first_addr)
264 if addr_len == 0 then
[all …]
/kernel/linux/linux-5.10/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()
632 u32 addr_len, in netlbl_unlhsh_remove() argument
639 if (addr_len != sizeof(struct in_addr) && in netlbl_unlhsh_remove()
640 addr_len != sizeof(struct in6_addr)) in netlbl_unlhsh_remove()
657 switch (addr_len) { in netlbl_unlhsh_remove()
769 u32 addr_len; in netlbl_unlabel_addrinfo_get() local
773 addr_len = nla_len(info->attrs[NLBL_UNLABEL_A_IPV4ADDR]); in netlbl_unlabel_addrinfo_get()
[all …]
/kernel/linux/linux-5.10/net/ceph/
Ddecode.c11 u32 struct_len, addr_len; in ceph_decode_entity_addr_versioned() local
26 ceph_decode_32_safe(p, end, addr_len, bad); in ceph_decode_entity_addr_versioned()
27 if (addr_len > sizeof(addr->in_addr)) in ceph_decode_entity_addr_versioned()
31 if (addr_len) { in ceph_decode_entity_addr_versioned()
32 ceph_decode_copy_safe(p, end, &addr->in_addr, addr_len, bad); in ceph_decode_entity_addr_versioned()
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/fs/nfsd/
Dflexfilelayoutxdr.c85 int addr_len; in nfsd4_ff_encode_getdeviceinfo() local
89 addr_len = 16 + da->netaddr.netid_len + da->netaddr.addr_len; in nfsd4_ff_encode_getdeviceinfo()
92 len = 4 + ver_len + 4 + addr_len; in nfsd4_ff_encode_getdeviceinfo()
105 p = xdr_encode_opaque(p, da->netaddr.addr, da->netaddr.addr_len); in nfsd4_ff_encode_getdeviceinfo()
/kernel/linux/linux-5.10/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()
641 compat_uint_t addr_len; member
649 compat_uint_t addr_len; member
[all …]
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/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()
114 memcpy(dev->dev_addr, sa->sa_data, dev->addr_len); in nr_set_mac_address()
173 dev->addr_len = AX25_ADDR_LEN; in nr_setup()
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/
Dtest_sock_addr.c604 struct sockaddr *addr, socklen_t addr_len) in mk_sockaddr() argument
614 memset(addr, 0, addr_len); in mk_sockaddr()
617 if (addr_len < sizeof(struct sockaddr_in)) in mk_sockaddr()
627 if (addr_len < sizeof(struct sockaddr_in6)) in mk_sockaddr()
1167 socklen_t addr_len) in start_server() argument
1177 if (bind(fd, (const struct sockaddr *)addr, addr_len) == -1) { in start_server()
1198 socklen_t addr_len) in connect_to_server() argument
1216 if (connect(fd, (const struct sockaddr *)addr, addr_len) == -1) { in connect_to_server()
1260 socklen_t addr_len, int set_cmsg, int flags, in sendmsg_to_server() argument
1296 hdr.msg_namelen = addr_len; in sendmsg_to_server()
[all …]
/kernel/linux/linux-5.10/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()
72 memcpy(dev->dev_addr, sa->sa_data, dev->addr_len); in rose_set_mac_address()
136 dev->addr_len = ROSE_ADDR_LEN; in rose_setup()
/kernel/linux/linux-5.10/tools/testing/selftests/net/
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()
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/net/ipv4/
Ddatagram.c20 int __ip4_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) in __ip4_datagram_connect() argument
31 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()
/kernel/linux/linux-5.10/fs/dlm/
Dlowcomms.c562 int *addr_len) in make_sockaddr() argument
568 *addr_len = sizeof(struct sockaddr_in); in make_sockaddr()
573 *addr_len = sizeof(struct sockaddr_in6); in make_sockaddr()
575 memset((char *)saddr + *addr_len, 0, sizeof(struct sockaddr_storage) - *addr_len); in make_sockaddr()
933 int i, addr_len, result = 0; in sctp_bind_addrs() local
937 make_sockaddr(&localaddr, port, &addr_len); in sctp_bind_addrs()
940 result = kernel_bind(con->sock, addr, addr_len); in sctp_bind_addrs()
942 result = sock_bind_add(con->sock->sk, addr, addr_len); in sctp_bind_addrs()
962 int addr_len; in sctp_connect_to_sock() local
1007 make_sockaddr(&daddr, dlm_config.ci_tcp_port, &addr_len); in sctp_connect_to_sock()
[all …]
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/net/l2tp/
Dl2tp_ip6.c262 static int l2tp_ip6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len) in l2tp_ip6_bind() argument
275 if (addr_len < sizeof(*addr)) in l2tp_ip6_bind()
363 int addr_len) in l2tp_ip6_connect() argument
371 if (addr_len < sizeof(*lsa)) in l2tp_ip6_connect()
395 rc = __ip6_datagram_connect(sk, uaddr, addr_len); in l2tp_ip6_connect()
503 int addr_len = msg->msg_namelen; in l2tp_ip6_sendmsg() local
528 if (addr_len < SIN6_LEN_RFC2133) in l2tp_ip6_sendmsg()
551 if (addr_len >= sizeof(struct sockaddr_in6) && in l2tp_ip6_sendmsg()
661 int noblock, int flags, int *addr_len) in l2tp_ip6_recvmsg() argument
673 return ipv6_recv_error(sk, msg, len, addr_len); in l2tp_ip6_recvmsg()
[all …]

12345678910>>...15