Home
last modified time | relevance | path

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

12345

/net/core/
Ddev_addr_lists.c24 const unsigned char *addr, int addr_len, in __hw_addr_create_ex() argument
37 memcpy(ha->addr, addr, addr_len); in __hw_addr_create_ex()
50 const unsigned char *addr, int addr_len, in __hw_addr_add_ex() argument
56 if (addr_len > MAX_ADDR_LEN) in __hw_addr_add_ex()
60 if (!memcmp(ha->addr, addr, addr_len) && in __hw_addr_add_ex()
80 return __hw_addr_create_ex(list, addr, addr_len, addr_type, global, in __hw_addr_add_ex()
85 const unsigned char *addr, int addr_len, in __hw_addr_add() argument
88 return __hw_addr_add_ex(list, addr, addr_len, addr_type, false, false, in __hw_addr_add()
117 const unsigned char *addr, int addr_len, in __hw_addr_del_ex() argument
123 if (!memcmp(ha->addr, addr, addr_len) && in __hw_addr_del_ex()
[all …]
/net/netlabel/
Dnetlabel_unlabeled.c387 u32 addr_len, in netlbl_unlhsh_add() argument
399 if (addr_len != sizeof(struct in_addr) && in netlbl_unlhsh_add()
400 addr_len != sizeof(struct in6_addr)) in netlbl_unlhsh_add()
425 switch (addr_len) { in netlbl_unlhsh_add()
651 u32 addr_len, in netlbl_unlhsh_remove() argument
658 if (addr_len != sizeof(struct in_addr) && in netlbl_unlhsh_remove()
659 addr_len != sizeof(struct in6_addr)) in netlbl_unlhsh_remove()
676 switch (addr_len) { in netlbl_unlhsh_remove()
788 u32 addr_len; in netlbl_unlabel_addrinfo_get() local
791 addr_len = nla_len(info->attrs[NLBL_UNLABEL_A_IPV4ADDR]); in netlbl_unlabel_addrinfo_get()
[all …]
Dnetlabel_unlabeled.h227 u32 addr_len,
234 u32 addr_len,
Dnetlabel_kapi.c222 u32 addr_len; in netlbl_cfg_unlbl_static_add() local
226 addr_len = sizeof(struct in_addr); in netlbl_cfg_unlbl_static_add()
230 addr_len = sizeof(struct in6_addr); in netlbl_cfg_unlbl_static_add()
238 dev_name, addr, mask, addr_len, in netlbl_cfg_unlbl_static_add()
264 u32 addr_len; in netlbl_cfg_unlbl_static_del() local
268 addr_len = sizeof(struct in_addr); in netlbl_cfg_unlbl_static_del()
272 addr_len = sizeof(struct in6_addr); in netlbl_cfg_unlbl_static_del()
280 dev_name, addr, mask, addr_len, in netlbl_cfg_unlbl_static_del()
/net/netrom/
Dnr_dev.c104 memcpy(buff, (saddr != NULL) ? saddr : dev->dev_addr, dev->addr_len); in nr_header()
111 memcpy(buff, daddr, dev->addr_len); in nr_header()
136 if (!memcmp(dev->dev_addr, sa->sa_data, dev->addr_len)) in nr_set_mac_address()
147 memcpy(dev->dev_addr, sa->sa_data, dev->addr_len); in nr_set_mac_address()
207 dev->addr_len = AX25_ADDR_LEN; in nr_setup()
/net/802/
Dfc.c66 memcpy(fch->saddr,saddr,dev->addr_len); in fc_header()
68 memcpy(fch->saddr,dev->dev_addr,dev->addr_len); in fc_header()
72 memcpy(fch->daddr,daddr,dev->addr_len); in fc_header()
109 dev->addr_len = FC_ALEN; in fc_setup()
Dfddi.c77 memcpy(fddi->saddr, saddr, dev->addr_len); in fddi_header()
79 memcpy(fddi->saddr, dev->dev_addr, dev->addr_len); in fddi_header()
83 memcpy(fddi->daddr, daddr, dev->addr_len); in fddi_header()
190 dev->addr_len = FDDI_K_ALEN; in fddi_setup()
Dhippi.c167 memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); in hippi_mac_addr()
205 dev->addr_len = HIPPI_ALEN; in hippi_setup()
/net/l2tp/
Dl2tp_ip6.c260 static int l2tp_ip6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len) in l2tp_ip6_bind() argument
271 if (addr_len < sizeof(*addr)) in l2tp_ip6_bind()
306 if (addr_len >= sizeof(struct sockaddr_in6) && in l2tp_ip6_bind()
363 int addr_len) in l2tp_ip6_connect() argument
374 if (addr_len < sizeof(*lsa)) in l2tp_ip6_connect()
390 rc = ip6_datagram_connect(sk, uaddr, addr_len); in l2tp_ip6_connect()
498 int addr_len = msg->msg_namelen; in l2tp_ip6_sendmsg() local
525 if (addr_len < SIN6_LEN_RFC2133) in l2tp_ip6_sendmsg()
549 if (addr_len >= sizeof(struct sockaddr_in6) && in l2tp_ip6_sendmsg()
656 int flags, int *addr_len) in l2tp_ip6_recvmsg() argument
[all …]
Dl2tp_ip.c247 static int l2tp_ip_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len) in l2tp_ip_bind() argument
255 if (addr_len < sizeof(struct sockaddr_l2tpip)) in l2tp_ip_bind()
272 if (sk->sk_state != TCP_CLOSE || addr_len < sizeof(struct sockaddr_l2tpip)) in l2tp_ip_bind()
307 static int l2tp_ip_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) in l2tp_ip_connect() argument
315 if (addr_len < sizeof(*lsa)) in l2tp_ip_connect()
321 rc = ip4_datagram_connect(sk, uaddr, addr_len); in l2tp_ip_connect()
514 size_t len, int noblock, int flags, int *addr_len) in l2tp_ip_recvmsg() argument
547 *addr_len = sizeof(*sin); in l2tp_ip_recvmsg()
/net/ipv4/
Ddatagram.c23 int __ip4_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) in __ip4_datagram_connect() argument
34 if (addr_len < sizeof(*usin)) in __ip4_datagram_connect()
87 int ip4_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) in ip4_datagram_connect() argument
92 res = __ip4_datagram_connect(sk, uaddr, addr_len); in ip4_datagram_connect()
Darp.c207 memcpy(haddr, dev->broadcast, dev->addr_len); in arp_mc_map()
302 memcpy(neigh->ha, dev->dev_addr, dev->addr_len); in arp_constructor()
306 memcpy(neigh->ha, dev->broadcast, dev->addr_len); in arp_constructor()
458 memcpy(haddr, dev->dev_addr, dev->addr_len); in arp_set_predefined()
464 memcpy(haddr, dev->broadcast, dev->addr_len); in arp_set_predefined()
654 arp->ar_hln = dev->addr_len; in arp_create()
660 memcpy(arp_ptr, src_hw, dev->addr_len); in arp_create()
661 arp_ptr += dev->addr_len; in arp_create()
672 memcpy(arp_ptr, target_hw, dev->addr_len); in arp_create()
674 memset(arp_ptr, 0, dev->addr_len); in arp_create()
[all …]
Daf_inet.c445 int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) in inet_bind() argument
457 err = sk->sk_prot->bind(sk, uaddr, addr_len); in inet_bind()
461 if (addr_len < sizeof(struct sockaddr_in)) in inet_bind()
540 int addr_len, int flags) in inet_dgram_connect() argument
544 if (addr_len < sizeof(uaddr->sa_family)) in inet_dgram_connect()
551 return sk->sk_prot->connect(sk, uaddr, addr_len); in inet_dgram_connect()
585 int addr_len, int flags) in __inet_stream_connect() argument
591 if (addr_len < sizeof(uaddr->sa_family)) in __inet_stream_connect()
616 err = sk->sk_prot->connect(sk, uaddr, addr_len); in __inet_stream_connect()
672 int addr_len, int flags) in inet_stream_connect() argument
[all …]
Dping.c304 struct sockaddr *uaddr, int addr_len) { in ping_check_bind_addr() argument
310 if (addr_len < sizeof(*addr)) in ping_check_bind_addr()
339 if (addr_len < sizeof(*addr)) in ping_check_bind_addr()
414 int ping_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len) in ping_bind() argument
421 err = ping_check_bind_addr(sk, isk, uaddr, addr_len); in ping_bind()
862 size_t len, int noblock, int flags, int *addr_len) in ping_recvmsg() argument
876 return inet_recv_error(sk, msg, len, addr_len); in ping_recvmsg()
904 *addr_len = sizeof(*sin); in ping_recvmsg()
926 *addr_len = sizeof(*sin6); in ping_recvmsg()
/net/ieee802154/
Daf_ieee802154.c115 int addr_len) in ieee802154_sock_bind() argument
120 return sk->sk_prot->bind(sk, uaddr, addr_len); in ieee802154_sock_bind()
122 return sock_no_bind(sock, uaddr, addr_len); in ieee802154_sock_bind()
126 int addr_len, int flags) in ieee802154_sock_connect() argument
130 if (addr_len < sizeof(uaddr->sa_family)) in ieee802154_sock_connect()
136 return sk->sk_prot->connect(sk, uaddr, addr_len); in ieee802154_sock_connect()
/net/rose/
Drose_dev.c98 if (!memcmp(dev->dev_addr, sa->sa_data, dev->addr_len)) in rose_set_mac_address()
109 memcpy(dev->dev_addr, sa->sa_data, dev->addr_len); in rose_set_mac_address()
166 dev->addr_len = ROSE_ADDR_LEN; in rose_setup()
Daf_rose.c656 static int rose_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) in rose_bind() argument
669 if (addr_len != sizeof(struct sockaddr_rose) && addr_len != sizeof(struct full_sockaddr_rose)) in rose_bind()
675 if (addr_len == sizeof(struct sockaddr_rose) && addr->srose_ndigis > 1) in rose_bind()
700 if (addr_len == sizeof(struct full_sockaddr_rose)) { in rose_bind()
717 static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_len, int flags) in rose_connect() argument
727 if (addr_len != sizeof(struct sockaddr_rose) && addr_len != sizeof(struct full_sockaddr_rose)) in rose_connect()
733 if (addr_len == sizeof(struct sockaddr_rose) && addr->srose_ndigis > 1) in rose_connect()
805 if (addr_len == sizeof(struct full_sockaddr_rose)) { in rose_connect()
/net/ipv6/
Ddatagram.c43 static int __ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) in __ip6_datagram_connect() argument
59 err = __ip4_datagram_connect(sk, uaddr, addr_len); in __ip6_datagram_connect()
63 if (addr_len < SIN6_LEN_RFC2133) in __ip6_datagram_connect()
131 if (addr_len >= sizeof(struct sockaddr_in6) && in __ip6_datagram_connect()
215 int ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) in ip6_datagram_connect() argument
220 res = __ip6_datagram_connect(sk, uaddr, addr_len); in ip6_datagram_connect()
227 int addr_len) in ip6_datagram_connect_v6_only() argument
232 return ip6_datagram_connect(sk, uaddr, addr_len); in ip6_datagram_connect_v6_only()
348 int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len) in ipv6_recv_error() argument
398 *addr_len = sizeof(*sin); in ipv6_recv_error()
[all …]
Draw.c242 static int rawv6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len) in rawv6_bind() argument
251 if (addr_len < SIN6_LEN_RFC2133) in rawv6_bind()
275 if (addr_len >= sizeof(struct sockaddr_in6) && in rawv6_bind()
461 int noblock, int flags, int *addr_len) in rawv6_recvmsg() argument
473 return ipv6_recv_error(sk, msg, len, addr_len); in rawv6_recvmsg()
476 return ipv6_recv_rxpmtu(sk, msg, len, addr_len); in rawv6_recvmsg()
510 *addr_len = sizeof(*sin6); in rawv6_recvmsg()
751 int addr_len = msg->msg_namelen; in rawv6_sendmsg() local
777 if (addr_len < SIN6_LEN_RFC2133) in rawv6_sendmsg()
812 if (addr_len >= sizeof(struct sockaddr_in6) && in rawv6_sendmsg()
/net/ax25/
Daf_ax25.c1038 static int ax25_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) in ax25_bind() argument
1048 if (addr_len != sizeof(struct sockaddr_ax25) && in ax25_bind()
1049 addr_len != sizeof(struct full_sockaddr_ax25)) in ax25_bind()
1053 if ((addr_len < sizeof(struct sockaddr_ax25) + sizeof(ax25_address) * 6) || in ax25_bind()
1054 (addr_len > sizeof(struct full_sockaddr_ax25))) in ax25_bind()
1087 if (addr_len > sizeof(struct sockaddr_ax25) && addr->fsa_ax25.sax25_ndigis == 1) { in ax25_bind()
1117 struct sockaddr *uaddr, int addr_len, int flags) in ax25_connect() argument
1129 if (addr_len == sizeof(struct sockaddr_ax25)) in ax25_connect()
1134 else if (addr_len != sizeof(struct full_sockaddr_ax25)) in ax25_connect()
1138 if ((addr_len < sizeof(struct sockaddr_ax25) + sizeof(ax25_address) * 6) || in ax25_connect()
[all …]
Dax25_ip.c64 memcpy(buff, daddr, dev->addr_len); /* Address specified */ in ax25_hard_header()
72 memcpy(buff, saddr, dev->addr_len); in ax25_hard_header()
74 memcpy(buff, dev->dev_addr, dev->addr_len); in ax25_hard_header()
/net/ipx/
Daf_ipx.c569 int addr_len; in ipxitf_send() local
647 addr_len = dev->addr_len; in ipxitf_send()
649 memcpy(dest_node, dev->broadcast, addr_len); in ipxitf_send()
651 memcpy(dest_node, &(node[IPX_NODE_LEN-addr_len]), addr_len); in ipxitf_send()
998 if (dev->addr_len > IPX_NODE_LEN) in ipxitf_create()
1016 memcpy(intrfc->if_node + IPX_NODE_LEN - dev->addr_len, in ipxitf_create()
1017 dev->dev_addr, dev->addr_len); in ipxitf_create()
1089 if (dev->addr_len > IPX_NODE_LEN) in ipxitf_auto_create()
1105 memcpy((char *)&(intrfc->if_node[IPX_NODE_LEN-dev->addr_len]), in ipxitf_auto_create()
1106 dev->dev_addr, dev->addr_len); in ipxitf_auto_create()
[all …]
/net/wimax/
Dstack.c449 unsigned char *addr, size_t addr_len) in wimax_addr_scnprint() argument
453 for (total = cnt = 0; cnt < addr_len; cnt++) in wimax_addr_scnprint()
456 cnt == addr_len - 1 ? '\0' : ':'); in wimax_addr_scnprint()
509 net_dev->dev_addr, net_dev->addr_len); in wimax_dev_add()
/net/rxrpc/
Daf_rxrpc.c225 int addr_len, int flags, in rxrpc_name_to_transport() argument
233 _enter("%p,%p,%d,%d", rx, addr, addr_len, flags); in rxrpc_name_to_transport()
374 int addr_len, int flags) in rxrpc_connect() argument
383 _enter("%p,%p,%d,%d", rx, addr, addr_len, flags); in rxrpc_connect()
385 ret = rxrpc_validate_address(rx, srx, addr_len); in rxrpc_connect()
419 trans = rxrpc_name_to_transport(sock, addr, addr_len, flags, in rxrpc_connect()
/net/rds/
Dbind.c162 int rds_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) in rds_bind() argument
172 if (addr_len != sizeof(struct sockaddr_in) || in rds_bind()

12345