18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef _TRANSP_V6_H 38c2ecf20Sopenharmony_ci#define _TRANSP_V6_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <net/checksum.h> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci/* IPv6 transport protocols */ 88c2ecf20Sopenharmony_ciextern struct proto rawv6_prot; 98c2ecf20Sopenharmony_ciextern struct proto udpv6_prot; 108c2ecf20Sopenharmony_ciextern struct proto udplitev6_prot; 118c2ecf20Sopenharmony_ciextern struct proto tcpv6_prot; 128c2ecf20Sopenharmony_ciextern struct proto pingv6_prot; 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_cistruct flowi6; 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci/* extension headers */ 178c2ecf20Sopenharmony_ciint ipv6_exthdrs_init(void); 188c2ecf20Sopenharmony_civoid ipv6_exthdrs_exit(void); 198c2ecf20Sopenharmony_ciint ipv6_frag_init(void); 208c2ecf20Sopenharmony_civoid ipv6_frag_exit(void); 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci/* transport protocols */ 238c2ecf20Sopenharmony_ciint pingv6_init(void); 248c2ecf20Sopenharmony_civoid pingv6_exit(void); 258c2ecf20Sopenharmony_ciint rawv6_init(void); 268c2ecf20Sopenharmony_civoid rawv6_exit(void); 278c2ecf20Sopenharmony_ciint udpv6_init(void); 288c2ecf20Sopenharmony_civoid udpv6_exit(void); 298c2ecf20Sopenharmony_ciint udplitev6_init(void); 308c2ecf20Sopenharmony_civoid udplitev6_exit(void); 318c2ecf20Sopenharmony_ciint tcpv6_init(void); 328c2ecf20Sopenharmony_civoid tcpv6_exit(void); 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ciint udpv6_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len); 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci/* this does all the common and the specific ctl work */ 378c2ecf20Sopenharmony_civoid ip6_datagram_recv_ctl(struct sock *sk, struct msghdr *msg, 388c2ecf20Sopenharmony_ci struct sk_buff *skb); 398c2ecf20Sopenharmony_civoid ip6_datagram_recv_common_ctl(struct sock *sk, struct msghdr *msg, 408c2ecf20Sopenharmony_ci struct sk_buff *skb); 418c2ecf20Sopenharmony_civoid ip6_datagram_recv_specific_ctl(struct sock *sk, struct msghdr *msg, 428c2ecf20Sopenharmony_ci struct sk_buff *skb); 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ciint ip6_datagram_send_ctl(struct net *net, struct sock *sk, struct msghdr *msg, 458c2ecf20Sopenharmony_ci struct flowi6 *fl6, struct ipcm6_cookie *ipc6); 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_civoid __ip6_dgram_sock_seq_show(struct seq_file *seq, struct sock *sp, 488c2ecf20Sopenharmony_ci __u16 srcp, __u16 destp, int rqueue, int bucket); 498c2ecf20Sopenharmony_cistatic inline void 508c2ecf20Sopenharmony_ciip6_dgram_sock_seq_show(struct seq_file *seq, struct sock *sp, __u16 srcp, 518c2ecf20Sopenharmony_ci __u16 destp, int bucket) 528c2ecf20Sopenharmony_ci{ 538c2ecf20Sopenharmony_ci __ip6_dgram_sock_seq_show(seq, sp, srcp, destp, sk_rmem_alloc_get(sp), 548c2ecf20Sopenharmony_ci bucket); 558c2ecf20Sopenharmony_ci} 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci#define LOOPBACK4_IPV6 cpu_to_be32(0x7f000006) 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_civoid inet6_destroy_sock(struct sock *sk); 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ci#define IPV6_SEQ_DGRAM_HEADER \ 628c2ecf20Sopenharmony_ci " sl " \ 638c2ecf20Sopenharmony_ci "local_address " \ 648c2ecf20Sopenharmony_ci "remote_address " \ 658c2ecf20Sopenharmony_ci "st tx_queue rx_queue tr tm->when retrnsmt" \ 668c2ecf20Sopenharmony_ci " uid timeout inode ref pointer drops\n" 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ci#endif 69