Lines Matching full:inet
3 * INET An implementation of the TCP/IP protocol suite for the LINUX
4 * operating system. INET is implemented using the BSD Socket
91 #include <linux/inet.h>
136 struct inet_sock *inet = inet_sk(sk); in inet_sock_destruct() local
149 pr_err("Attempt to release alive inet socket %p\n", sk); in inet_sock_destruct()
158 kfree(rcu_dereference_protected(inet->inet_opt, 1)); in inet_sock_destruct()
176 struct inet_sock *inet; in inet_autobind() local
179 inet = inet_sk(sk); in inet_autobind()
180 if (!inet->inet_num) { in inet_autobind()
185 inet->inet_sport = htons(inet->inet_num); in inet_autobind()
249 * Create an inet socket.
257 struct inet_sock *inet; in inet_create() local
337 inet = inet_sk(sk); in inet_create()
343 inet->inet_num = protocol; in inet_create()
349 inet->pmtudisc = IP_PMTUDISC_DONT; in inet_create()
351 inet->pmtudisc = IP_PMTUDISC_WANT; in inet_create()
353 atomic_set(&inet->inet_id, 0); in inet_create()
362 inet->uc_ttl = -1; in inet_create()
364 inet->mc_ttl = 1; in inet_create()
366 inet->mc_index = 0; in inet_create()
367 inet->mc_list = NULL; in inet_create()
368 inet->rcv_tos = 0; in inet_create()
370 if (inet->inet_num) { in inet_create()
376 inet->inet_sport = htons(inet->inet_num); in inet_create()
477 struct inet_sock *inet = inet_sk(sk); in __inet_bind() local
505 if (!inet_addr_valid_or_nonlocal(net, inet, addr->sin_addr.s_addr, in __inet_bind()
528 if (sk->sk_state != TCP_CLOSE || inet->inet_num) in __inet_bind()
531 inet->inet_rcv_saddr = inet->inet_saddr = addr->sin_addr.s_addr; in __inet_bind()
533 inet->inet_saddr = 0; /* Use device */ in __inet_bind()
540 inet->inet_saddr = inet->inet_rcv_saddr = 0; in __inet_bind()
546 inet->inet_saddr = inet->inet_rcv_saddr = 0; in __inet_bind()
554 if (inet->inet_rcv_saddr) in __inet_bind()
558 inet->inet_sport = htons(inet->inet_num); in __inet_bind()
559 inet->inet_daddr = 0; in __inet_bind()
560 inet->inet_dport = 0; in __inet_bind()
801 struct inet_sock *inet = inet_sk(sk); in inet_getname() local
808 if (!inet->inet_dport || in inet_getname()
814 sin->sin_port = inet->inet_dport; in inet_getname()
815 sin->sin_addr.s_addr = inet->inet_daddr; in inet_getname()
819 __be32 addr = inet->inet_rcv_saddr; in inet_getname()
821 addr = inet->inet_saddr; in inet_getname()
822 sin->sin_port = inet->inet_sport; in inet_getname()
950 * ioctl() calls you can issue on an INET socket. Most of these are
1257 struct inet_sock *inet = inet_sk(sk); in inet_sk_reselect_saddr() local
1258 __be32 old_saddr = inet->inet_saddr; in inet_sk_reselect_saddr()
1259 __be32 daddr = inet->inet_daddr; in inet_sk_reselect_saddr()
1266 inet_opt = rcu_dereference_protected(inet->inet_opt, in inet_sk_reselect_saddr()
1272 fl4 = &inet->cork.fl.u.ip4; in inet_sk_reselect_saddr()
1274 sk->sk_protocol, inet->inet_sport, in inet_sk_reselect_saddr()
1275 inet->inet_dport, sk); in inet_sk_reselect_saddr()
1295 pr_info("%s(): shifting inet->saddr from %pI4 to %pI4\n", in inet_sk_reselect_saddr()
1313 struct inet_sock *inet = inet_sk(sk); in inet_sk_rebuild_header() local
1325 inet_opt = rcu_dereference(inet->inet_opt); in inet_sk_rebuild_header()
1326 daddr = inet->inet_daddr; in inet_sk_rebuild_header()
1330 fl4 = &inet->cork.fl.u.ip4; in inet_sk_rebuild_header()
1331 rt = ip_route_output_ports(sock_net(sk), fl4, sk, daddr, inet->inet_saddr, in inet_sk_rebuild_header()
1332 inet->inet_dport, inet->inet_sport, in inet_sk_rebuild_header()
2018 pr_crit("%s: Cannot init ipv4 inet pernet ops\n", __func__); in inet_init()