Deleted Added
full compact
ipcp.c (65178) ipcp.c (71356)
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 * $FreeBSD: head/usr.sbin/ppp/ipcp.c 65178 2000-08-28 22:44:54Z brian $
20 * $FreeBSD: head/usr.sbin/ppp/ipcp.c 71356 2001-01-22 01:43:46Z brian $
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>

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

866 req.slots = (ipcp->my_compproto >> 8) & 255;
867 req.compcid = ipcp->my_compproto & 1;
868 memcpy(o->data, &req, 4);
869 INC_LCP_OPT(TY_COMPPROTO, 6, o);
870 }
871 }
872
873 if (IsEnabled(ipcp->cfg.ns.dns_neg) &&
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>

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

866 req.slots = (ipcp->my_compproto >> 8) & 255;
867 req.compcid = ipcp->my_compproto & 1;
868 memcpy(o->data, &req, 4);
869 INC_LCP_OPT(TY_COMPPROTO, 6, o);
870 }
871 }
872
873 if (IsEnabled(ipcp->cfg.ns.dns_neg) &&
874 !REJECTED(ipcp, TY_PRIMARY_DNS - TY_ADJUST_NS) &&
875 !REJECTED(ipcp, TY_SECONDARY_DNS - TY_ADJUST_NS)) {
874 !REJECTED(ipcp, TY_PRIMARY_DNS - TY_ADJUST_NS)) {
876 memcpy(o->data, &ipcp->dns[0].s_addr, 4);
877 INC_LCP_OPT(TY_PRIMARY_DNS, 6, o);
875 memcpy(o->data, &ipcp->dns[0].s_addr, 4);
876 INC_LCP_OPT(TY_PRIMARY_DNS, 6, o);
877 }
878
879 if (IsEnabled(ipcp->cfg.ns.dns_neg) &&
880 !REJECTED(ipcp, TY_SECONDARY_DNS - TY_ADJUST_NS)) {
878 memcpy(o->data, &ipcp->dns[1].s_addr, 4);
879 INC_LCP_OPT(TY_SECONDARY_DNS, 6, o);
880 }
881
882 fsm_Output(fp, CODE_CONFIGREQ, fp->reqid, buff, (u_char *)o - buff,
883 MB_IPCPOUT);
884}
885

--- 598 unchanged lines hidden ---
881 memcpy(o->data, &ipcp->dns[1].s_addr, 4);
882 INC_LCP_OPT(TY_SECONDARY_DNS, 6, o);
883 }
884
885 fsm_Output(fp, CODE_CONFIGREQ, fp->reqid, buff, (u_char *)o - buff,
886 MB_IPCPOUT);
887}
888

--- 598 unchanged lines hidden ---