projects/linux·blob master · refs

63 lines · 1.8 KiB

1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _TRANSP_V6_H
3#define _TRANSP_V6_H
4
5#include <net/checksum.h>
6#include <net/sock.h>
7
8/* IPv6 transport protocols */
9extern struct proto rawv6_prot;
10extern struct proto udpv6_prot;
11extern struct proto tcpv6_prot;
12extern struct proto pingv6_prot;
13
14struct flowi6;
15struct ipcm6_cookie;
16
17/* extension headers */
18int ipv6_exthdrs_init(void);
19void ipv6_exthdrs_exit(void);
20int ipv6_frag_init(void);
21void ipv6_frag_exit(void);
22
23/* transport protocols */
24int pingv6_init(void);
25void pingv6_exit(void);
26int rawv6_init(void);
27void rawv6_exit(void);
28int udpv6_init(void);
29void udpv6_exit(void);
30int tcpv6_init(void);
31void tcpv6_exit(void);
32
33/* this does all the common and the specific ctl work */
34void ip6_datagram_recv_ctl(struct sock *sk, struct msghdr *msg,
35 struct sk_buff *skb);
36void ip6_datagram_recv_common_ctl(struct sock *sk, struct msghdr *msg,
37 struct sk_buff *skb);
38void ip6_datagram_recv_specific_ctl(struct sock *sk, struct msghdr *msg,
39 struct sk_buff *skb);
40
41int ip6_datagram_send_ctl(struct net *net, struct sock *sk, struct msghdr *msg,
42 struct flowi6 *fl6, struct ipcm6_cookie *ipc6);
43
44void __ip6_dgram_sock_seq_show(struct seq_file *seq, struct sock *sp,
45 __u16 srcp, __u16 destp, int rqueue, int bucket);
46static inline void
47ip6_dgram_sock_seq_show(struct seq_file *seq, struct sock *sp, __u16 srcp,
48 __u16 destp, int bucket)
49{
50 __ip6_dgram_sock_seq_show(seq, sp, srcp, destp, sk_rmem_alloc_get(sp),
51 bucket);
52}
53
54#define LOOPBACK4_IPV6 cpu_to_be32(0x7f000006)
55
56#define IPV6_SEQ_DGRAM_HEADER \
57 " sl " \
58 "local_address " \
59 "remote_address " \
60 "st tx_queue rx_queue tr tm->when retrnsmt" \
61 " uid timeout inode ref pointer drops\n"
62
63#endif