udp_tunnel.h 598 B

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