Lines Matching refs:inet
174 struct inet_sock *inet = inet_sk(sk); in ip_cmsg_recv_offset() local
175 unsigned int flags = inet->cmsg_flags; in ip_cmsg_recv_offset()
439 struct inet_sock *inet = inet_sk(sk); in ip_local_error() local
444 if (!inet->recverr) in ip_local_error()
894 struct inet_sock *inet = inet_sk(sk); in do_ip_setsockopt() local
959 old = rcu_dereference_protected(inet->inet_opt, in do_ip_setsockopt()
961 if (inet->is_icsk) { in do_ip_setsockopt()
967 inet->inet_daddr != LOOPBACK4_IPV6)) { in do_ip_setsockopt()
978 rcu_assign_pointer(inet->inet_opt, opt); in do_ip_setsockopt()
985 inet->cmsg_flags |= IP_CMSG_PKTINFO; in do_ip_setsockopt()
987 inet->cmsg_flags &= ~IP_CMSG_PKTINFO; in do_ip_setsockopt()
991 inet->cmsg_flags |= IP_CMSG_TTL; in do_ip_setsockopt()
993 inet->cmsg_flags &= ~IP_CMSG_TTL; in do_ip_setsockopt()
997 inet->cmsg_flags |= IP_CMSG_TOS; in do_ip_setsockopt()
999 inet->cmsg_flags &= ~IP_CMSG_TOS; in do_ip_setsockopt()
1003 inet->cmsg_flags |= IP_CMSG_RECVOPTS; in do_ip_setsockopt()
1005 inet->cmsg_flags &= ~IP_CMSG_RECVOPTS; in do_ip_setsockopt()
1009 inet->cmsg_flags |= IP_CMSG_RETOPTS; in do_ip_setsockopt()
1011 inet->cmsg_flags &= ~IP_CMSG_RETOPTS; in do_ip_setsockopt()
1015 inet->cmsg_flags |= IP_CMSG_PASSSEC; in do_ip_setsockopt()
1017 inet->cmsg_flags &= ~IP_CMSG_PASSSEC; in do_ip_setsockopt()
1021 inet->cmsg_flags |= IP_CMSG_ORIGDSTADDR; in do_ip_setsockopt()
1023 inet->cmsg_flags &= ~IP_CMSG_ORIGDSTADDR; in do_ip_setsockopt()
1027 if (!(inet->cmsg_flags & IP_CMSG_CHECKSUM)) { in do_ip_setsockopt()
1029 inet->cmsg_flags |= IP_CMSG_CHECKSUM; in do_ip_setsockopt()
1032 if (inet->cmsg_flags & IP_CMSG_CHECKSUM) { in do_ip_setsockopt()
1034 inet->cmsg_flags &= ~IP_CMSG_CHECKSUM; in do_ip_setsockopt()
1042 inet->cmsg_flags |= IP_CMSG_RECVFRAGSIZE; in do_ip_setsockopt()
1044 inet->cmsg_flags &= ~IP_CMSG_RECVFRAGSIZE; in do_ip_setsockopt()
1054 inet->uc_ttl = val; in do_ip_setsockopt()
1061 inet->hdrincl = val ? 1 : 0; in do_ip_setsockopt()
1068 inet->nodefrag = val ? 1 : 0; in do_ip_setsockopt()
1071 inet->bind_address_no_port = val ? 1 : 0; in do_ip_setsockopt()
1076 inet->pmtudisc = val; in do_ip_setsockopt()
1079 inet->recverr = !!val; in do_ip_setsockopt()
1086 inet->recverr_rfc4884 = !!val; in do_ip_setsockopt()
1097 inet->mc_ttl = val; in do_ip_setsockopt()
1102 inet->mc_loop = !!val; in do_ip_setsockopt()
1115 inet->uc_index = 0; in do_ip_setsockopt()
1132 inet->uc_index = ifindex; in do_ip_setsockopt()
1170 inet->mc_index = 0; in do_ip_setsockopt()
1171 inet->mc_addr = 0; in do_ip_setsockopt()
1196 inet->mc_index = mreq.imr_ifindex; in do_ip_setsockopt()
1197 inet->mc_addr = mreq.imr_address.s_addr; in do_ip_setsockopt()
1324 inet->mc_all = val; in do_ip_setsockopt()
1330 inet->freebind = !!val; in do_ip_setsockopt()
1349 inet->transparent = !!val; in do_ip_setsockopt()
1364 WRITE_ONCE(inet->min_ttl, val); in do_ip_setsockopt()
1530 struct inet_sock *inet = inet_sk(sk); in do_ip_getsockopt() local
1557 inet_opt = rcu_dereference_protected(inet->inet_opt, in do_ip_getsockopt()
1581 val = (inet->cmsg_flags & IP_CMSG_PKTINFO) != 0; in do_ip_getsockopt()
1584 val = (inet->cmsg_flags & IP_CMSG_TTL) != 0; in do_ip_getsockopt()
1587 val = (inet->cmsg_flags & IP_CMSG_TOS) != 0; in do_ip_getsockopt()
1590 val = (inet->cmsg_flags & IP_CMSG_RECVOPTS) != 0; in do_ip_getsockopt()
1593 val = (inet->cmsg_flags & IP_CMSG_RETOPTS) != 0; in do_ip_getsockopt()
1596 val = (inet->cmsg_flags & IP_CMSG_PASSSEC) != 0; in do_ip_getsockopt()
1599 val = (inet->cmsg_flags & IP_CMSG_ORIGDSTADDR) != 0; in do_ip_getsockopt()
1602 val = (inet->cmsg_flags & IP_CMSG_CHECKSUM) != 0; in do_ip_getsockopt()
1605 val = (inet->cmsg_flags & IP_CMSG_RECVFRAGSIZE) != 0; in do_ip_getsockopt()
1608 val = inet->tos; in do_ip_getsockopt()
1613 val = (inet->uc_ttl == -1 ? in do_ip_getsockopt()
1615 inet->uc_ttl); in do_ip_getsockopt()
1619 val = inet->hdrincl; in do_ip_getsockopt()
1622 val = inet->nodefrag; in do_ip_getsockopt()
1625 val = inet->bind_address_no_port; in do_ip_getsockopt()
1628 val = inet->pmtudisc; in do_ip_getsockopt()
1646 val = inet->recverr; in do_ip_getsockopt()
1649 val = inet->recverr_rfc4884; in do_ip_getsockopt()
1652 val = inet->mc_ttl; in do_ip_getsockopt()
1655 val = inet->mc_loop; in do_ip_getsockopt()
1658 val = (__force int)htonl((__u32) inet->uc_index); in do_ip_getsockopt()
1664 addr.s_addr = inet->mc_addr; in do_ip_getsockopt()
1696 val = inet->mc_all; in do_ip_getsockopt()
1717 if (inet->cmsg_flags & IP_CMSG_PKTINFO) { in do_ip_getsockopt()
1720 info.ipi_addr.s_addr = inet->inet_rcv_saddr; in do_ip_getsockopt()
1721 info.ipi_spec_dst.s_addr = inet->inet_rcv_saddr; in do_ip_getsockopt()
1722 info.ipi_ifindex = inet->mc_index; in do_ip_getsockopt()
1725 if (inet->cmsg_flags & IP_CMSG_TTL) { in do_ip_getsockopt()
1726 int hlim = inet->mc_ttl; in do_ip_getsockopt()
1729 if (inet->cmsg_flags & IP_CMSG_TOS) { in do_ip_getsockopt()
1730 int tos = inet->rcv_tos; in do_ip_getsockopt()
1737 val = inet->freebind; in do_ip_getsockopt()
1740 val = inet->transparent; in do_ip_getsockopt()
1743 val = inet->min_ttl; in do_ip_getsockopt()