diff options
author | marcus <marcus@FreeBSD.org> | 2003-09-23 07:41:55 +0000 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2003-09-23 07:41:55 +0000 |
commit | e19a1e64d248ad6f10230273b0afcd49b570e0ba (patch) | |
tree | dcae4425b97cd670a26f1074a999df062d47d4e1 /sbin | |
parent | 1adbd0035e01b5e125de7222da250f6c0cb4634a (diff) | |
download | FreeBSD-src-e19a1e64d248ad6f10230273b0afcd49b570e0ba.zip FreeBSD-src-e19a1e64d248ad6f10230273b0afcd49b570e0ba.tar.gz |
Add Cisco Skinny Station protocol support to libalias, natd, and ppp.
Skinny is the protocol used by Cisco IP phones to talk to Cisco Call
Managers. With this code, one can use a Cisco IP phone behind a FreeBSD
NAT gateway.
Currently, having the Call Manager behind the NAT gateway is not supported.
More information on enabling Skinny support in libalias, natd, and ppp
can be found in those applications' manpages.
PR: 55843
Reviewed by: ru
Approved by: ru
MFC after: 30 days
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/natd/natd.8 | 8 | ||||
-rw-r--r-- | sbin/natd/natd.c | 25 |
2 files changed, 33 insertions, 0 deletions
diff --git a/sbin/natd/natd.8 b/sbin/natd/natd.8 index 92a2656..d8c7bf8 100644 --- a/sbin/natd/natd.8 +++ b/sbin/natd/natd.8 @@ -31,6 +31,7 @@ .Op Fl log_denied .Op Fl log_facility Ar facility_name .Op Fl punch_fw Ar firewall_range +.Op Fl skinny_port Ar port .Op Fl log_ipfw_denied .Op Fl pid_file | P Ar pidfile .Ek @@ -483,6 +484,13 @@ rules starting from the rule number .Ar basenumber will be used for punching firewall holes. The range will be cleared for all rules on startup. +.It Fl skinny_port Ar port +This option allows you to specify the TCP port used for +the Skinny Station protocol. +Skinny is used by Cisco IP phones to communicate with +Cisco Call Managers to set up voice over IP calls. +By default, Skinny aliasing is not performed. +The typical port value for Skinny is 2000. .It Fl log_ipfw_denied Log when a packet cannot be re-injected because an .Xr ipfw 8 diff --git a/sbin/natd/natd.c b/sbin/natd/natd.c index ec123f7..f8ba6a6 100644 --- a/sbin/natd/natd.c +++ b/sbin/natd/natd.c @@ -99,6 +99,7 @@ static int StrToProto (const char* str); static int StrToAddrAndPortRange (const char* str, struct in_addr* addr, char* proto, port_range *portRange); static void ParseArgs (int argc, char** argv); static void SetupPunchFW(const char *strValue); +static void SetupSkinnyPort(const char *strValue); /* * Globals. @@ -838,6 +839,7 @@ enum Option { LogDenied, LogFacility, PunchFW, + SkinnyPort, LogIpfwDenied, PidFile }; @@ -1059,6 +1061,14 @@ static struct OptionInfo optionTable[] = { "punch_fw", NULL }, + { SkinnyPort, + 0, + String, + "port", + "set the TCP port for use with the Skinny Station protocol", + "skinny_port", + NULL }, + { LogIpfwDenied, 0, YesNo, @@ -1258,6 +1268,10 @@ static void ParseOption (const char* option, const char* parms) SetupPunchFW(strValue); break; + case SkinnyPort: + SetupSkinnyPort(strValue); + break; + case LogIpfwDenied: logIpfwDenied = yesNoValue;; break; @@ -1705,3 +1719,14 @@ SetupPunchFW(const char *strValue) PacketAliasSetFWBase(base, num); (void)PacketAliasSetMode(PKT_ALIAS_PUNCH_FW, PKT_ALIAS_PUNCH_FW); } + +static void +SetupSkinnyPort(const char *strValue) +{ + unsigned int port; + + if (sscanf(strValue, "%u", &port) != 1) + errx(1, "skinny_port: port parameter required"); + + PacketAliasSetSkinnyPort(port); +} |