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 /usr.sbin/ppp | |
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 'usr.sbin/ppp')
-rw-r--r-- | usr.sbin/ppp/command.c | 2 | ||||
-rw-r--r-- | usr.sbin/ppp/nat_cmd.c | 23 | ||||
-rw-r--r-- | usr.sbin/ppp/nat_cmd.h | 1 | ||||
-rw-r--r-- | usr.sbin/ppp/ppp.8.m4 | 8 |
4 files changed, 34 insertions, 0 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index d05471c..635b197 100644 --- a/usr.sbin/ppp/command.c +++ b/usr.sbin/ppp/command.c @@ -773,6 +773,8 @@ static struct cmdtab const NatCommands[] = {"punch_fw", NULL, nat_PunchFW, LOCAL_AUTH, "firewall control", "nat punch_fw [base count]"}, #endif + {"skinny_port", NULL, nat_SkinnyPort, LOCAL_AUTH, + "TCP port used by Skinny Station protocol", "nat skinny_port [port]"}, {"same_ports", NULL, NatOption, LOCAL_AUTH, "try to leave port numbers unchanged", "nat same_ports yes|no", (const void *) PKT_ALIAS_SAME_PORTS}, diff --git a/usr.sbin/ppp/nat_cmd.c b/usr.sbin/ppp/nat_cmd.c index deb9932..8172fd6 100644 --- a/usr.sbin/ppp/nat_cmd.c +++ b/usr.sbin/ppp/nat_cmd.c @@ -470,6 +470,29 @@ nat_PunchFW(struct cmdargs const *arg) } #endif +int +nat_SkinnyPort(struct cmdargs const *arg) +{ + char *end; + long port; + + if (arg->argc == arg->argn) { + PacketAliasSetSkinnyPort(0); + return 0; + } + + if (arg->argc != arg->argn + 1) + return -1; + + port = strtol(arg->argv[arg->argn], &end, 10); + if (*end != '\0' || port < 0) + return -1; + + PacketAliasSetSkinnyPort(port); + + return 0; +} + static struct mbuf * nat_LayerPush(struct bundle *bundle, struct link *l, struct mbuf *bp, int pri, u_short *proto) diff --git a/usr.sbin/ppp/nat_cmd.h b/usr.sbin/ppp/nat_cmd.h index c70afb0..f4c3655 100644 --- a/usr.sbin/ppp/nat_cmd.h +++ b/usr.sbin/ppp/nat_cmd.h @@ -37,5 +37,6 @@ extern int nat_SetTarget(struct cmdargs const *); #ifndef NO_FW_PUNCH extern int nat_PunchFW(struct cmdargs const *); #endif +extern int nat_SkinnyPort(struct cmdargs const *); extern struct layer natlayer; diff --git a/usr.sbin/ppp/ppp.8.m4 b/usr.sbin/ppp/ppp.8.m4 index e58b4a4..a3de3bf 100644 --- a/usr.sbin/ppp/ppp.8.m4 +++ b/usr.sbin/ppp/ppp.8.m4 @@ -3470,6 +3470,14 @@ The range will be cleared when the command is run. .Pp If no arguments are given, firewall punching is disabled. +.It nat skinny_port Op Ar port +This command tells +.Nm +which TCP port is used by the Skinny Station protocol. Skinny is used by +Cisco IP phones to communicate with Cisco Call Managers to setup voice +over IP calls. The typical port used by Skinny is 2000. +.Pp +If no argument is given, skinny aliasing is disabled. .It nat same_ports yes|no When enabled, this command will tell the network address translation engine to attempt to avoid changing the port number on outgoing packets. |