diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2004-10-15 15:47:27 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2004-10-15 15:47:27 +0000 |
commit | 642ae82e0ef06e8cfb5c1e08aa03fa7e149952c2 (patch) | |
tree | 7eb6e7166603e718a02ce0b180f6be86f3347442 /net/siproxd/files | |
parent | aa6998b5090aca2cf225ed39d86ec2af0544b15e (diff) | |
download | ports-642ae82e0ef06e8cfb5c1e08aa03fa7e149952c2.tar.gz ports-642ae82e0ef06e8cfb5c1e08aa03fa7e149952c2.zip |
Add siproxd, a proxy/masquerading daemon for the SIP protocol.
It handles registrations of SIP clients on a private IP network
and performs rewriting of the SIP message bodies to make SIP
connections possible via a masquerading firewall.
It allows SIP clients (like kphone, linphone) to work behind
an IP masquerading firewall or router.
PR: ports/72691
Submitted by: Frank W. Josellis <frank@dynamical-systems.org>
Notes
Notes:
svn path=/head/; revision=119509
Diffstat (limited to 'net/siproxd/files')
-rw-r--r-- | net/siproxd/files/patch-doc_siproxd.conf.example | 37 | ||||
-rw-r--r-- | net/siproxd/files/patch-src_siproxd.c | 18 | ||||
-rw-r--r-- | net/siproxd/files/patch-src_utils.c | 18 | ||||
-rw-r--r-- | net/siproxd/files/siproxd.sh | 42 |
4 files changed, 115 insertions, 0 deletions
diff --git a/net/siproxd/files/patch-doc_siproxd.conf.example b/net/siproxd/files/patch-doc_siproxd.conf.example new file mode 100644 index 000000000000..bef9561bf5c6 --- /dev/null +++ b/net/siproxd/files/patch-doc_siproxd.conf.example @@ -0,0 +1,37 @@ +--- doc/siproxd.conf.example.orig Sun May 9 14:53:06 2004 ++++ doc/siproxd.conf.example Mon Oct 11 21:25:41 2004 +@@ -9,8 +9,8 @@ + ###################################################################### + # The interface names of INBOUND and OUTBOUND interface. + # +-if_inbound = eth0 +-if_outbound = ppp0 ++if_inbound = ed0 ++if_outbound = tun0 + + + ###################################################################### +@@ -70,20 +70,20 @@ + # user: uid/gid to switch to after startup + # chrootjail: path to chroot to (chroot jail) + user = nobody +-#chrootjail = /var/lib/siproxd/ ++chrootjail = /usr/local/siproxd/ + + ###################################################################### + # Registration file: + # Where to store the current registrations. + # An empty value means we do not save registrations. Make sure that + # the specified directory path does exist! +-registration_file = /var/lib/siproxd/siproxd_registrations ++registration_file = siproxd_registrations + + ###################################################################### + # PID file: + # Where to create the PID file. + # This file holds the PID of the main thread of siproxd. +-pid_file = /var/run/siproxd/siproxd.pid ++pid_file = siproxd.pid + + ###################################################################### + # global switch to control the RTP proxy behaviour diff --git a/net/siproxd/files/patch-src_siproxd.c b/net/siproxd/files/patch-src_siproxd.c new file mode 100644 index 000000000000..661631042921 --- /dev/null +++ b/net/siproxd/files/patch-src_siproxd.c @@ -0,0 +1,18 @@ +--- src/siproxd.c.orig Thu Aug 26 19:32:08 2004 ++++ src/siproxd.c Thu Oct 14 07:18:15 2004 +@@ -179,6 +179,7 @@ + /* + * Init stuff + */ ++ INFO(PACKAGE"-"VERSION"-"BUILDSTR" started"); + + /* read the config file */ + if (read_config(configfile, config_search) == STS_FAILURE) exit(1); +@@ -245,7 +246,6 @@ + /* initialize the registration facility */ + register_init(); + +- INFO(PACKAGE"-"VERSION"-"BUILDSTR" started"); + /* + * silence the log - if so required... + */ diff --git a/net/siproxd/files/patch-src_utils.c b/net/siproxd/files/patch-src_utils.c new file mode 100644 index 000000000000..ea32b78c3bc1 --- /dev/null +++ b/net/siproxd/files/patch-src_utils.c @@ -0,0 +1,18 @@ +--- src/utils.c.orig Sun Aug 22 21:04:37 2004 ++++ src/utils.c Thu Oct 14 07:18:15 2004 +@@ -247,12 +247,12 @@ + * as it loads some dynamic libraries. Once chrootet + * these libraries will *not* be found and gethostbyname() + * calls will simply fail (return NULL pointer and h_errno=0). ++ * Also (at least for FreeBSD) syslog() needs to be called ++ * before chroot()ing - this is done in main() by an INFO(). + * Took me a while to figure THIS one out + */ + struct in_addr dummy; +- DEBUGC(DBCLASS_DNS, "Initializing DNS, the following DNS " +- "failure is normal, don't worry"); +- get_ip_by_host("foobar", &dummy); ++ get_ip_by_host("localhost", &dummy); + DEBUGC(DBCLASS_CONFIG,"chrooting to %s", + configuration.chrootjail); + sts = chroot(configuration.chrootjail); diff --git a/net/siproxd/files/siproxd.sh b/net/siproxd/files/siproxd.sh new file mode 100644 index 000000000000..9d4485646813 --- /dev/null +++ b/net/siproxd/files/siproxd.sh @@ -0,0 +1,42 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: siproxd +# REQUIRE: DAEMON +# KEYWORD: FreeBSD +# +# NOTE for FreeBSD 5.0+: +# If you want this script to start with the base rc scripts +# move siproxd.sh to /etc/rc.d/siproxd + +prefix=%%PREFIX%% + +# Define these siproxd_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/siproxd +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# +siproxd_enable=${siproxd_enable:-"NO"} # Enable siproxd +siproxd_flags=${siproxd_flags:-""} # Flags to siproxd program +#siproxd_program="${prefix}/sbin/siproxd" # Location of siproxd + +. %%RC_SUBR%% + +name="siproxd" +rcvar=`set_rcvar` +command="${prefix}/sbin/${name}" + +load_rc_config $name + +case $1 in + start) + run_rc_command "$1" 2> /dev/null + ;; + *) + run_rc_command "$1" + ;; +esac |