raw_listener.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (C) 2010 iptelorg GmbH
  3. *
  4. * Permission to use, copy, modify, and distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. /** raw socket udp listen functions.
  17. * @file raw_listener.h
  18. * @ingroup core
  19. * Module: @ref core
  20. */
  21. /*
  22. * History:
  23. * --------
  24. * 2010-06-09 initial version (from older code) andrei
  25. */
  26. #ifndef _raw_listener_h
  27. #define _raw_listener_h
  28. #include "ip_addr.h"
  29. /** default raw socket used for sending on udp ipv4 */
  30. struct socket_info* raw_udp_sendipv4;
  31. int raw_listener_init(struct socket_info* si, str* iface, int iphdr_incl);
  32. int raw_udp4_rcv_loop(int rsock, int port1, int port2);
  33. #endif /* _raw_listener_h */