nat_cmd.c (102500) | nat_cmd.c (120372) |
---|---|
1/*- 2 * Copyright (c) 2001 Charles Mott <cm@linktel.net> 3 * Brian Somers <brian@Awfulhak.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * | 1/*- 2 * Copyright (c) 2001 Charles Mott <cm@linktel.net> 3 * Brian Somers <brian@Awfulhak.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * |
27 * $FreeBSD: head/usr.sbin/ppp/nat_cmd.c 102500 2002-08-27 20:11:58Z brian $ | 27 * $FreeBSD: head/usr.sbin/ppp/nat_cmd.c 120372 2003-09-23 07:41:55Z marcus $ |
28 */ 29 30#include <sys/param.h> 31#include <netinet/in.h> 32#include <arpa/inet.h> 33#include <netdb.h> 34#include <netinet/in_systm.h> 35#include <netinet/in.h> --- 429 unchanged lines hidden (view full) --- 465 466 PacketAliasSetFWBase(base, count); 467 PacketAliasSetMode(PKT_ALIAS_PUNCH_FW, PKT_ALIAS_PUNCH_FW); 468 469 return 0; 470} 471#endif 472 | 28 */ 29 30#include <sys/param.h> 31#include <netinet/in.h> 32#include <arpa/inet.h> 33#include <netdb.h> 34#include <netinet/in_systm.h> 35#include <netinet/in.h> --- 429 unchanged lines hidden (view full) --- 465 466 PacketAliasSetFWBase(base, count); 467 PacketAliasSetMode(PKT_ALIAS_PUNCH_FW, PKT_ALIAS_PUNCH_FW); 468 469 return 0; 470} 471#endif 472 |
473int 474nat_SkinnyPort(struct cmdargs const *arg) 475{ 476 char *end; 477 long port; 478 479 if (arg->argc == arg->argn) { 480 PacketAliasSetSkinnyPort(0); 481 return 0; 482 } 483 484 if (arg->argc != arg->argn + 1) 485 return -1; 486 487 port = strtol(arg->argv[arg->argn], &end, 10); 488 if (*end != '\0' || port < 0) 489 return -1; 490 491 PacketAliasSetSkinnyPort(port); 492 493 return 0; 494} 495 |
|
473static struct mbuf * 474nat_LayerPush(struct bundle *bundle, struct link *l, struct mbuf *bp, 475 int pri, u_short *proto) 476{ 477 if (!bundle->NatEnabled || *proto != PROTO_IP) 478 return bp; 479 480 log_Printf(LogDEBUG, "nat_LayerPush: PROTO_IP -> PROTO_IP\n"); --- 91 unchanged lines hidden --- | 496static struct mbuf * 497nat_LayerPush(struct bundle *bundle, struct link *l, struct mbuf *bp, 498 int pri, u_short *proto) 499{ 500 if (!bundle->NatEnabled || *proto != PROTO_IP) 501 return bp; 502 503 log_Printf(LogDEBUG, "nat_LayerPush: PROTO_IP -> PROTO_IP\n"); --- 91 unchanged lines hidden --- |