Am 08.06.2010 09:09, schrieb Andrei Pelinescu-Onciul:
On Jun 08, 2010 at 08:43, Klaus Darilionklaus.mailinglists@pernau.at wrote:
Lovely.
Do you plan to export this functionality to the script? e.g. if force_send_socket() does not find the forced UDP socket, it uses a raw socket?
Not exactly, I plan to use it as a replacement for udp sockets (higher performance on send on linux) and in the future for handling icmp. The force_send_socket() stuff it's a good idea.
I just read about raw sockets (http://sock-raw.org/papers/sock_raw) and when sending on raw_sockets, there wont be any fragmentation. So that would need to be implemented in sr as well.
Is the performance gain really worth the effort? I wonder why constructing of IP/UDP headers in sr is faster than having it done in the kernel.
another interesting point is if the raw socket receives the packet before or after iptables filtering.
regards klaus
Andrei
Am 08.06.2010 00:24, schrieb Andrei Pelinescu-Onciul:
Module: sip-router Branch: andrei/raw_sock Commit: 2f0276f711ba7aad9ffa1de0445f75df015abbad URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2f0276f7...
Author: Andrei Pelinescu-Onciulandrei@iptel.org Committer: Andrei Pelinescu-Onciulandrei@iptel.org Date: Tue Jun 8 00:21:08 2010 +0200
core: basic raw socket support functions
Basic support for raw sockets. Functions for creating, sending and receiving udp packets over raw sockets. Initial version supports only linux.
raw_sock.c | 452 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ raw_sock.h | 52 +++++++ 2 files changed, 504 insertions(+), 0 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=2f02...
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev