freebsd-dev/usr.sbin/ppp/ipcp.h
Brian Somers bcc332bdb0 Allow random IP number allocation to peer.
Validate the peers suggested IP by attempting to make a routing table
entry.
Give up IPCP negotiation if the peer NAKs us with an unusable IP.
Always SIOCDIFADDR then SIOCAIFADDR when configuring the tun device.
Using SIOCSIFDSTADDR allows duplicate dst addresses (which we don't
want)!!!
Allow up to 200 interface names (was 50) (now that ppp can play server
properly).
Up the version number (1.5 -> 1.6).

Cosmetic:
  Log unexpected CCP packets in the CCP log rather than the ERROR log.
  Log unexpected Config Reqs in the appropriate LCP/IPCP/CCP log rather
  than the ERROR log.
  Log failed route additions and deletions with WARN, not TCPIP.
  Log the option id and length for unrecognised IPCP options.
  Change some .Sq to .Ar in the man page.
1997-12-13 02:37:33 +00:00

81 lines
2.3 KiB
C

/*
* Written by Toshiharu OHNO (tony-o@iij.ad.jp)
*
* Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
*
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the Internet Initiative Japan. The name of the
* IIJ may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: ipcp.h,v 1.14 1997/11/22 03:37:35 brian Exp $
*
* TODO:
*/
#define IPCP_MAXCODE CODE_CODEREJ
#define TY_IPADDRS 1
#define TY_COMPPROTO 2
#define TY_IPADDR 3
/* MS PPP NameServer and NetBIOS NameServer stuff */
#ifndef NOMSEXT
#define TY_PRIMARY_DNS 129
#define TY_PRIMARY_NBNS 130
#define TY_SECONDARY_DNS 131
#define TY_SECONDARY_NBNS 132
extern struct in_addr ns_entries[2];
extern struct in_addr nbns_entries[2];
#endif
struct ipcpstate {
struct in_addr his_ipaddr; /* IP address he is willing to use */
u_long his_compproto;
struct in_addr want_ipaddr; /* IP address I'm willing to use */
u_long want_compproto;
u_long his_reject; /* Request codes rejected by peer */
u_long my_reject; /* Request codes I have rejected */
int heis1172; /* True if he is speaking rfc1172 */
};
struct compreq {
u_short proto;
u_char slots;
u_char compcid;
};
struct in_range {
struct in_addr ipaddr;
struct in_addr mask;
int width;
};
extern struct ipcpstate IpcpInfo;
extern struct in_range DefMyAddress;
extern struct in_range DefHisAddress;
extern struct iplist DefHisChoice;
extern struct in_addr TriggerAddress;
extern int HaveTriggerAddress;
extern struct fsm IpcpFsm;
extern void IpcpInit(void);
extern void IpcpDefAddress(void);
extern void IpcpUp(void);
extern void IpcpOpen(void);
extern int ReportIpcpStatus(struct cmdargs const *);
extern void IpcpInput(struct mbuf *);
extern void IpcpAddInOctets(int);
extern void IpcpAddOutOctets(int);