Lines Matching refs:inet
135 struct inet_sock *inet = inet_sk(sk); in inet_sock_destruct() local
157 kfree(rcu_dereference_protected(inet->inet_opt, 1)); in inet_sock_destruct()
175 struct inet_sock *inet; in inet_autobind() local
178 inet = inet_sk(sk); in inet_autobind()
179 if (!inet->inet_num) { in inet_autobind()
184 inet->inet_sport = htons(inet->inet_num); in inet_autobind()
256 struct inet_sock *inet; in inet_create() local
336 inet = inet_sk(sk); in inet_create()
342 inet->inet_num = protocol; in inet_create()
348 inet->pmtudisc = IP_PMTUDISC_DONT; in inet_create()
350 inet->pmtudisc = IP_PMTUDISC_WANT; in inet_create()
352 atomic_set(&inet->inet_id, 0); in inet_create()
361 inet->uc_ttl = -1; in inet_create()
363 inet->mc_ttl = 1; in inet_create()
365 inet->mc_index = 0; in inet_create()
366 inet->mc_list = NULL; in inet_create()
367 inet->rcv_tos = 0; in inet_create()
369 if (inet->inet_num) { in inet_create()
375 inet->inet_sport = htons(inet->inet_num); in inet_create()
476 struct inet_sock *inet = inet_sk(sk); in __inet_bind() local
504 if (!inet_addr_valid_or_nonlocal(net, inet, addr->sin_addr.s_addr, in __inet_bind()
527 if (sk->sk_state != TCP_CLOSE || inet->inet_num) in __inet_bind()
530 inet->inet_rcv_saddr = inet->inet_saddr = addr->sin_addr.s_addr; in __inet_bind()
532 inet->inet_saddr = 0; /* Use device */ in __inet_bind()
539 inet->inet_saddr = inet->inet_rcv_saddr = 0; in __inet_bind()
545 inet->inet_saddr = inet->inet_rcv_saddr = 0; in __inet_bind()
553 if (inet->inet_rcv_saddr) in __inet_bind()
557 inet->inet_sport = htons(inet->inet_num); in __inet_bind()
558 inet->inet_daddr = 0; in __inet_bind()
559 inet->inet_dport = 0; in __inet_bind()
798 struct inet_sock *inet = inet_sk(sk); in inet_getname() local
805 if (!inet->inet_dport || in inet_getname()
811 sin->sin_port = inet->inet_dport; in inet_getname()
812 sin->sin_addr.s_addr = inet->inet_daddr; in inet_getname()
816 __be32 addr = inet->inet_rcv_saddr; in inet_getname()
818 addr = inet->inet_saddr; in inet_getname()
819 sin->sin_port = inet->inet_sport; in inet_getname()
1253 struct inet_sock *inet = inet_sk(sk); in inet_sk_reselect_saddr() local
1254 __be32 old_saddr = inet->inet_saddr; in inet_sk_reselect_saddr()
1255 __be32 daddr = inet->inet_daddr; in inet_sk_reselect_saddr()
1262 inet_opt = rcu_dereference_protected(inet->inet_opt, in inet_sk_reselect_saddr()
1268 fl4 = &inet->cork.fl.u.ip4; in inet_sk_reselect_saddr()
1270 sk->sk_protocol, inet->inet_sport, in inet_sk_reselect_saddr()
1271 inet->inet_dport, sk); in inet_sk_reselect_saddr()
1308 struct inet_sock *inet = inet_sk(sk); in inet_sk_rebuild_header() local
1321 inet_opt = rcu_dereference(inet->inet_opt); in inet_sk_rebuild_header()
1322 daddr = inet->inet_daddr; in inet_sk_rebuild_header()
1326 fl4 = &inet->cork.fl.u.ip4; in inet_sk_rebuild_header()
1327 rt = ip_route_output_ports(sock_net(sk), fl4, sk, daddr, inet->inet_saddr, in inet_sk_rebuild_header()
1328 inet->inet_dport, inet->inet_sport, in inet_sk_rebuild_header()