1 #ifndef __NET_UDP_TUNNEL_H 2 #define __NET_UDP_TUNNEL_H 3 4 struct udp_port_cfg { 5 u8 family; 6 7 /* Used only for kernel-created sockets */ 8 union { 9 struct in_addr local_ip; 10 #if IS_ENABLED(CONFIG_IPV6) 11 struct in6_addr local_ip6; 12 #endif 13 }; 14 15 union { 16 struct in_addr peer_ip; 17 #if IS_ENABLED(CONFIG_IPV6) 18 struct in6_addr peer_ip6; 19 #endif 20 }; 21 22 __be16 local_udp_port; 23 __be16 peer_udp_port; 24 unsigned int use_udp_checksums:1, 25 use_udp6_tx_checksums:1, 26 use_udp6_rx_checksums:1; 27 }; 28 29 int udp_sock_create(struct net *net, struct udp_port_cfg *cfg, 30 struct socket **sockp); 31 32 #endif 33