Module: sip-router Branch: andrei/raw_sock Commit: 2542c0f30f0ce7cd11c437f19afb53a3b3e9f2a8 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2542c0f3...
Author: Andrei Pelinescu-Onciul andrei@iptel.org Committer: Andrei Pelinescu-Onciul andrei@iptel.org Date: Tue Aug 10 17:43:25 2010 +0200
raw sockets: freebsd support
Support freebsd and theoretically other BSDs (other BSDs not tested):
- on most BSDs the offset and length of the ip header must be filled in host byte order (when using raw sockets with IPHDR_INC). - no need for user-space fragmentation for raw sockets - use IP_RECVDSTADDR and IPSENDSRCADDR instead of IP_PKTINFO (for raw sockets without IPHDR_INC) - fix ip header length (wrongly computed, on linux it worked because linux always ignores and overwrites it)
---
raw_sock.c | 133 +++++++++++++++++++++++++++++++++++++++++++++++---------- udp_server.c | 4 +- 2 files changed, 111 insertions(+), 26 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=2542...