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