udpgw.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /**
  2. * @file udpgw.h
  3. * @author Ambroz Bizjak <ambrop7@gmail.com>
  4. *
  5. * @section LICENSE
  6. *
  7. * This file is part of BadVPN.
  8. *
  9. * BadVPN is free software: you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2
  11. * as published by the Free Software Foundation.
  12. *
  13. * BadVPN is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License along
  19. * with this program; if not, write to the Free Software Foundation, Inc.,
  20. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  21. */
  22. // name of the program
  23. #define PROGRAM_NAME "udpgw"
  24. // maxiumum listen addresses
  25. #define MAX_LISTEN_ADDRS 16
  26. // maximum datagram size
  27. #define DEFAULT_UDP_MTU 65520
  28. // connection buffer size for sending to client, in packets
  29. #define CONNECTION_CLIENT_BUFFER_SIZE 1
  30. // connection buffer size for sending to UDP, in packets
  31. #define CONNECTION_UDP_BUFFER_SIZE 1
  32. // maximum number of clients
  33. #define DEFAULT_MAX_CLIENTS 3
  34. // maximum connections for client
  35. #define DEFAULT_MAX_CONNECTIONS_FOR_CLIENT 256
  36. // how long after nothing has been received to disconnect a client
  37. #define CLIENT_DISCONNECT_TIMEOUT 20000
  38. // SO_SNDBFUF socket option for clients, 0 to not set
  39. #define CLIENT_DEFAULT_SOCKET_SEND_BUFFER 1048576