Deleted Added
full compact
ipcp.c (46686) ipcp.c (46828)
1/*
2 * PPP IP Control Protocol (IPCP) Module
3 *
4 * Written by Toshiharu OHNO (tony-o@iij.ad.jp)
5 *
6 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
7 *
8 * Redistribution and use in source and binary forms are permitted
9 * provided that the above copyright notice and this paragraph are
10 * duplicated in all such forms and that any documentation,
11 * advertising materials, and other materials related to such
12 * distribution and use acknowledge that the software was developed
13 * by the Internet Initiative Japan, Inc. The name of the
14 * IIJ may not be used to endorse or promote products derived
15 * from this software without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
18 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19 *
1/*
2 * PPP IP Control Protocol (IPCP) Module
3 *
4 * Written by Toshiharu OHNO (tony-o@iij.ad.jp)
5 *
6 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
7 *
8 * Redistribution and use in source and binary forms are permitted
9 * provided that the above copyright notice and this paragraph are
10 * duplicated in all such forms and that any documentation,
11 * advertising materials, and other materials related to such
12 * distribution and use acknowledge that the software was developed
13 * by the Internet Initiative Japan, Inc. The name of the
14 * IIJ may not be used to endorse or promote products derived
15 * from this software without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
18 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19 *
20 * $Id: ipcp.c,v 1.75 1999/04/26 08:54:34 brian Exp $
20 * $Id: ipcp.c,v 1.76 1999/05/08 11:06:45 brian Exp $
21 *
22 * TODO:
23 * o Support IPADDRS properly
24 * o Validate the length in IpcpDecodeConfig
25 */
26#include <sys/param.h>
27#include <netinet/in_systm.h>
28#include <netinet/in.h>

--- 761 unchanged lines hidden (view full) ---

790AcceptableAddr(const struct in_range *prange, struct in_addr ipaddr)
791{
792 /* Is the given IP in the given range ? */
793 return (prange->ipaddr.s_addr & prange->mask.s_addr) ==
794 (ipaddr.s_addr & prange->mask.s_addr) && ipaddr.s_addr;
795}
796
797static void
21 *
22 * TODO:
23 * o Support IPADDRS properly
24 * o Validate the length in IpcpDecodeConfig
25 */
26#include <sys/param.h>
27#include <netinet/in_systm.h>
28#include <netinet/in.h>

--- 761 unchanged lines hidden (view full) ---

790AcceptableAddr(const struct in_range *prange, struct in_addr ipaddr)
791{
792 /* Is the given IP in the given range ? */
793 return (prange->ipaddr.s_addr & prange->mask.s_addr) ==
794 (ipaddr.s_addr & prange->mask.s_addr) && ipaddr.s_addr;
795}
796
797static void
798IpcpDecodeConfig(struct fsm *fp, u_char * cp, int plen, int mode_type,
798IpcpDecodeConfig(struct fsm *fp, u_char *cp, int plen, int mode_type,
799 struct fsm_decode *dec)
800{
801 /* Deal with incoming PROTO_IPCP */
802 struct iface *iface = fp->bundle->iface;
803 struct ipcp *ipcp = fsm2ipcp(fp);
804 int type, length, gotdns, gotdnsnak, n;
805 u_int32_t compproto;
806 struct compreq *pcomp;

--- 417 unchanged lines hidden ---
799 struct fsm_decode *dec)
800{
801 /* Deal with incoming PROTO_IPCP */
802 struct iface *iface = fp->bundle->iface;
803 struct ipcp *ipcp = fsm2ipcp(fp);
804 int type, length, gotdns, gotdnsnak, n;
805 u_int32_t compproto;
806 struct compreq *pcomp;

--- 417 unchanged lines hidden ---