Lines Matching refs:sk
73 struct sock *sk; member
103 int ip_build_and_send_pkt(struct sk_buff *skb, const struct sock *sk,
110 int ip_output(struct net *net, struct sock *sk, struct sk_buff *skb);
111 int ip_mc_output(struct net *net, struct sock *sk, struct sk_buff *skb);
112 int ip_do_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,
115 int __ip_local_out(struct net *net, struct sock *sk, struct sk_buff *skb);
116 int ip_local_out(struct net *net, struct sock *sk, struct sk_buff *skb);
118 int ip_queue_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl);
120 int ip_append_data(struct sock *sk, struct flowi4 *fl4,
129 ssize_t ip_append_page(struct sock *sk, struct flowi4 *fl4, struct page *page,
131 struct sk_buff *__ip_make_skb(struct sock *sk, struct flowi4 *fl4,
135 int ip_push_pending_frames(struct sock *sk, struct flowi4 *fl4);
136 void ip_flush_pending_frames(struct sock *sk);
137 struct sk_buff *ip_make_skb(struct sock *sk, struct flowi4 *fl4,
144 static inline struct sk_buff *ip_finish_skb(struct sock *sk, struct flowi4 *fl4) in ip_finish_skb() argument
146 return __ip_make_skb(sk, fl4, &sk->sk_write_queue, &inet_sk(sk)->cork.base); in ip_finish_skb()
154 static inline __u8 get_rtconn_flags(struct ipcm_cookie* ipc, struct sock* sk) in get_rtconn_flags() argument
156 return (ipc->tos != -1) ? RT_CONN_FLAGS_TOS(sk, ipc->tos) : RT_CONN_FLAGS(sk); in get_rtconn_flags()
160 int __ip4_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len);
161 int ip4_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len);
163 void ip4_datagram_release_cb(struct sock *sk);
182 void ip_send_unicast_reply(struct sock *sk, struct sk_buff *skb,
281 int ip_dont_fragment(const struct sock *sk, const struct dst_entry *dst) in ip_dont_fragment() argument
283 u8 pmtudisc = READ_ONCE(inet_sk(sk)->pmtudisc); in ip_dont_fragment()
290 static inline bool ip_sk_accept_pmtu(const struct sock *sk) in ip_sk_accept_pmtu() argument
292 return inet_sk(sk)->pmtudisc != IP_PMTUDISC_INTERFACE && in ip_sk_accept_pmtu()
293 inet_sk(sk)->pmtudisc != IP_PMTUDISC_OMIT; in ip_sk_accept_pmtu()
296 static inline bool ip_sk_use_pmtu(const struct sock *sk) in ip_sk_use_pmtu() argument
298 return inet_sk(sk)->pmtudisc < IP_PMTUDISC_PROBE; in ip_sk_use_pmtu()
301 static inline bool ip_sk_ignore_df(const struct sock *sk) in ip_sk_ignore_df() argument
303 return inet_sk(sk)->pmtudisc < IP_PMTUDISC_DO || in ip_sk_ignore_df()
304 inet_sk(sk)->pmtudisc == IP_PMTUDISC_OMIT; in ip_sk_ignore_df()
322 struct sock *sk = skb->sk; in ip_skb_dst_mtu() local
324 if (!sk || !sk_fullsock(sk) || ip_sk_use_pmtu(sk)) { in ip_skb_dst_mtu()
337 struct sock *sk, int segs) in ip_select_ident_segs() argument
347 if (sk && inet_sk(sk)->inet_daddr) { in ip_select_ident_segs()
348 iph->id = htons(inet_sk(sk)->inet_id); in ip_select_ident_segs()
349 inet_sk(sk)->inet_id += segs; in ip_select_ident_segs()
359 struct sock *sk) in ip_select_ident() argument
361 ip_select_ident_segs(net, skb, sk, 1); in ip_select_ident()
457 static __inline__ void inet_reset_saddr(struct sock *sk) in inet_reset_saddr() argument
459 inet_sk(sk)->inet_rcv_saddr = inet_sk(sk)->inet_saddr = 0; in inet_reset_saddr()
461 if (sk->sk_family == PF_INET6) { in inet_reset_saddr()
462 struct ipv6_pinfo *np = inet6_sk(sk); in inet_reset_saddr()
465 memset(&sk->sk_v6_rcv_saddr, 0, sizeof(sk->sk_v6_rcv_saddr)); in inet_reset_saddr()
555 void ipv4_pktinfo_prepare(const struct sock *sk, struct sk_buff *skb);
559 int ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval,
561 int ip_getsockopt(struct sock *sk, int level, int optname, char __user *optval,
563 int compat_ip_setsockopt(struct sock *sk, int level, int optname,
565 int compat_ip_getsockopt(struct sock *sk, int level, int optname,
567 int ip_ra_control(struct sock *sk, unsigned char on,
570 int ip_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len);
571 void ip_icmp_error(struct sock *sk, struct sk_buff *skb, int err, __be16 port,
573 void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 dport,