Rename ccpstate to ccp, ipcpstate to ipcp and lcpstate to lcp.

This commit is contained in:
Brian Somers 1998-02-08 11:05:01 +00:00
parent 9876c443a8
commit aad81d1ecf
11 changed files with 50 additions and 50 deletions

View File

@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: arp.c,v 1.27.2.1 1998/02/02 19:32:56 brian Exp $
* $Id: arp.c,v 1.27.2.2 1998/02/07 20:49:14 brian Exp $
*
*/
@ -87,7 +87,7 @@ static struct {
static int arpmsg_valid;
int
sifproxyarp(struct bundle *bundle, struct ipcpstate *ipcp, int s)
sifproxyarp(struct bundle *bundle, struct ipcp *ipcp, int s)
{
int routes;
@ -133,7 +133,7 @@ sifproxyarp(struct bundle *bundle, struct ipcpstate *ipcp, int s)
* cifproxyarp - Delete the proxy ARP entry for the peer.
*/
int
cifproxyarp(struct bundle *bundle, struct ipcpstate *ipcp, int s)
cifproxyarp(struct bundle *bundle, struct ipcp *ipcp, int s)
{
int routes;
@ -165,7 +165,7 @@ cifproxyarp(struct bundle *bundle, struct ipcpstate *ipcp, int s)
* sifproxyarp - Make a proxy ARP entry for the peer.
*/
int
sifproxyarp(struct bundle *bundle, struct ipcpstate *ipcp, int s)
sifproxyarp(struct bundle *bundle, struct ipcp *ipcp, int s)
{
struct arpreq arpreq;
struct {
@ -201,7 +201,7 @@ sifproxyarp(struct bundle *bundle, struct ipcpstate *ipcp, int s)
* cifproxyarp - Delete the proxy ARP entry for the peer.
*/
int
cifproxyarp(struct bundle *bundle, struct ipcpstate *ipcp, int s)
cifproxyarp(struct bundle *bundle, struct ipcp *ipcp, int s)
{
struct arpreq arpreq;

View File

@ -17,11 +17,11 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: arp.h,v 1.7.2.1 1998/02/02 19:32:57 brian Exp $
* $Id: arp.h,v 1.7.2.2 1998/02/07 20:49:16 brian Exp $
*
*/
struct ipcp;
extern int cifproxyarp(struct bundle *, struct ipcpstate *, int);
extern int sifproxyarp(struct bundle *, struct ipcpstate *, int);
extern int cifproxyarp(struct bundle *, struct ipcp *, int);
extern int sifproxyarp(struct bundle *, struct ipcp *, int);

View File

@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: async.c,v 1.15.2.3 1998/02/02 19:32:00 brian Exp $
* $Id: async.c,v 1.15.2.4 1998/02/02 19:33:29 brian Exp $
*
*/
#include <sys/param.h>
@ -56,7 +56,7 @@ async_Init(struct async *async)
}
void
async_SetLinkParams(struct async *async, struct lcpstate *lcp)
async_SetLinkParams(struct async *async, struct lcp *lcp)
{
async->my_accmap = lcp->want_accmap;
async->his_accmap = lcp->his_accmap;

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: async.h,v 1.2.4.3 1998/02/02 19:32:00 brian Exp $
* $Id: async.h,v 1.2.4.4 1998/02/02 19:33:33 brian Exp $
*/
#define HDLCSIZE (MAX_MRU*2+6)
@ -38,6 +38,6 @@ struct async {
};
extern void async_Init(struct async *);
extern void async_SetLinkParams(struct async *, struct lcpstate *);
extern void async_SetLinkParams(struct async *, struct lcp *);
extern void async_Output(int, struct mbuf *, int, struct physical *);
extern void async_Input(struct bundle *, u_char *, int, struct physical *);

View File

@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: ccp.c,v 1.30.2.6 1998/02/06 02:24:04 brian Exp $
* $Id: ccp.c,v 1.30.2.7 1998/02/07 20:49:26 brian Exp $
*
* TODO:
* o Support other compression protocols
@ -65,7 +65,7 @@ static struct fsm_callbacks ccp_Callbacks = {
CcpDecodeConfig
};
struct ccpstate CcpInfo = {
struct ccp CcpInfo = {
{
"CCP",
PROTO_CCP,
@ -167,7 +167,7 @@ static void
CcpSendConfigReq(struct fsm *fp)
{
/* Send config REQ please */
struct ccpstate *ccp = fsm2ccp(fp);
struct ccp *ccp = fsm2ccp(fp);
u_char *cp;
int f;
@ -192,7 +192,7 @@ void
CcpSendResetReq(struct fsm *fp)
{
/* We can't read our input - ask peer to reset */
struct ccpstate *ccp = fsm2ccp(fp);
struct ccp *ccp = fsm2ccp(fp);
LogPrintf(LogCCP, "SendResetReq(%d)\n", fp->reqid);
ccp->reset_sent = fp->reqid;
ccp->last_reset = -1;
@ -217,7 +217,7 @@ void
CcpRecvResetReq(struct fsm *fp)
{
/* Got a reset REQ, reset outgoing dictionary */
struct ccpstate *ccp = fsm2ccp(fp);
struct ccp *ccp = fsm2ccp(fp);
if (ccp->out_init)
(*algorithm[ccp->out_algorithm]->o.Reset)();
}
@ -233,7 +233,7 @@ static void
CcpLayerFinish(struct fsm *fp)
{
/* We're now down */
struct ccpstate *ccp = fsm2ccp(fp);
struct ccp *ccp = fsm2ccp(fp);
LogPrintf(LogCCP, "CcpLayerFinish.\n");
if (ccp->in_init) {
(*algorithm[ccp->in_algorithm]->i.Term)();
@ -259,7 +259,7 @@ static void
CcpLayerUp(struct fsm *fp)
{
/* We're now up */
struct ccpstate *ccp = fsm2ccp(fp);
struct ccp *ccp = fsm2ccp(fp);
LogPrintf(LogCCP, "CcpLayerUp.\n");
if (!ccp->in_init && ccp->in_algorithm >= 0 &&
ccp->in_algorithm < NALGORITHMS)
@ -320,7 +320,7 @@ static void
CcpDecodeConfig(struct fsm *fp, u_char *cp, int plen, int mode_type)
{
/* Deal with incoming data */
struct ccpstate *ccp = fsm2ccp(fp);
struct ccp *ccp = fsm2ccp(fp);
int type, length;
int f;

View File

@ -15,7 +15,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: ccp.h,v 1.14.2.6 1998/02/06 02:24:06 brian Exp $
* $Id: ccp.h,v 1.14.2.7 1998/02/07 20:49:27 brian Exp $
*
* TODO:
*/
@ -35,7 +35,7 @@
#define TY_PPPD_DEFLATE 24 /* Deflate (gzip) - (mis) numbered by pppd */
#define TY_DEFLATE 26 /* Deflate (gzip) - rfc 1979 */
struct ccpstate {
struct ccp {
struct fsm fsm; /* The finite state machine */
int his_proto; /* peer's compression protocol */
@ -57,9 +57,9 @@ struct ccpstate {
u_long uncompin, compin;
};
extern struct ccpstate CcpInfo;
extern struct ccp CcpInfo;
#define fsm2ccp(fp) (fp->proto == PROTO_CCP ? (struct ccpstate *)fp : NULL)
#define fsm2ccp(fp) (fp->proto == PROTO_CCP ? (struct ccp *)fp : NULL)
struct ccp_algorithm {
int id;

View File

@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: ipcp.c,v 1.50.2.8 1998/02/06 02:24:19 brian Exp $
* $Id: ipcp.c,v 1.50.2.9 1998/02/07 20:49:41 brian Exp $
*
* TODO:
* o More RFC1772 backwoard compatibility
@ -95,7 +95,7 @@ static struct fsm_callbacks ipcp_Callbacks = {
IpcpDecodeConfig,
};
struct ipcpstate IpcpInfo = {
struct ipcp IpcpInfo = {
{
"IPCP",
PROTO_IPCP,
@ -273,7 +273,7 @@ IpcpInit(struct bundle *bundle, struct link *l)
}
static int
ipcp_SetIPaddress(struct bundle *bundle, struct ipcpstate *ipcp,
ipcp_SetIPaddress(struct bundle *bundle, struct ipcp *ipcp,
struct in_addr myaddr, struct in_addr hisaddr,
struct in_addr netmask, int silent)
{
@ -355,7 +355,7 @@ ipcp_SetIPaddress(struct bundle *bundle, struct ipcpstate *ipcp,
}
static struct in_addr
ChooseHisAddr(struct bundle *bundle, struct ipcpstate *ipcp,
ChooseHisAddr(struct bundle *bundle, struct ipcp *ipcp,
const struct in_addr gw)
{
struct in_addr try;
@ -393,7 +393,7 @@ IpcpSendConfigReq(struct fsm *fp)
{
/* Send config REQ please */
struct physical *p = link2physical(fp->link);
struct ipcpstate *ipcp = fsm2ipcp(fp);
struct ipcp *ipcp = fsm2ipcp(fp);
u_char *cp;
struct lcp_opt o;
@ -458,7 +458,7 @@ static void
IpcpLayerDown(struct fsm *fp)
{
/* About to come down */
struct ipcpstate *ipcp = fsm2ipcp(fp);
struct ipcp *ipcp = fsm2ipcp(fp);
const char *s;
s = inet_ntoa(ipcp->if_peer);
@ -515,7 +515,7 @@ static void
IpcpLayerUp(struct fsm *fp)
{
/* We're now up */
struct ipcpstate *ipcp = fsm2ipcp(fp);
struct ipcp *ipcp = fsm2ipcp(fp);
char tbuff[100];
LogPrintf(LogIPCP, "IpcpLayerUp(%d).\n", fp->state);
@ -589,7 +589,7 @@ static void
IpcpDecodeConfig(struct fsm *fp, u_char * cp, int plen, int mode_type)
{
/* Deal with incoming PROTO_IPCP */
struct ipcpstate *ipcp = fsm2ipcp(fp);
struct ipcp *ipcp = fsm2ipcp(fp);
int type, length;
u_long *lp, compproto;
struct compreq *pcomp;

View File

@ -15,7 +15,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: ipcp.h,v 1.18.2.9 1998/02/06 02:24:20 brian Exp $
* $Id: ipcp.h,v 1.18.2.10 1998/02/07 20:49:43 brian Exp $
*
* TODO:
*/
@ -39,7 +39,7 @@ struct in_range {
int width;
};
struct ipcpstate {
struct ipcp {
struct fsm fsm; /* The finite state machine */
int VJInitSlots; /* Maximum VJ slots */
@ -75,9 +75,9 @@ struct ipcpstate {
struct pppThroughput throughput; /* throughput statistics */
};
extern struct ipcpstate IpcpInfo;
extern struct ipcp IpcpInfo;
#define fsm2ipcp(fp) (fp->proto == PROTO_IPCP ? (struct ipcpstate *)fp : NULL)
#define fsm2ipcp(fp) (fp->proto == PROTO_IPCP ? (struct ipcp *)fp : NULL)
extern void IpcpInit(struct bundle *, struct link *l);
extern void IpcpDefAddress(void);

View File

@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: lcp.c,v 1.55.2.10 1998/02/06 02:24:22 brian Exp $
* $Id: lcp.c,v 1.55.2.11 1998/02/07 20:49:44 brian Exp $
*
* TODO:
* o Limit data field length by MRU
@ -97,7 +97,7 @@ static struct fsm_callbacks lcp_Callbacks = {
LcpDecodeConfig
};
struct lcpstate LcpInfo = {
struct lcp LcpInfo = {
{
"LCP", /* Name of protocol */
PROTO_LCP, /* Protocol Number */
@ -320,7 +320,7 @@ LcpSendConfigReq(struct fsm *fp)
{
/* Send config REQ please */
struct physical *p = link2physical(fp->link);
struct lcpstate *lcp = fsm2lcp(fp);
struct lcp *lcp = fsm2lcp(fp);
u_char *cp;
struct lcp_opt o;
@ -411,7 +411,7 @@ static void
LcpLayerFinish(struct fsm *fp)
{
/* We're now down */
struct lcpstate *lcp = fsm2lcp(fp);
struct lcp *lcp = fsm2lcp(fp);
LogPrintf(LogLCP, "LcpLayerFinish\n");
lcp->LcpFailedMagic = 0;
@ -424,7 +424,7 @@ LcpLayerUp(struct fsm *fp)
{
/* We're now up */
struct physical *p = link2physical(fp->link);
struct lcpstate *lcp = fsm2lcp(fp);
struct lcp *lcp = fsm2lcp(fp);
LogPrintf(LogLCP, "LcpLayerUp\n");
@ -470,7 +470,7 @@ static void
LcpDecodeConfig(struct fsm *fp, u_char *cp, int plen, int mode_type)
{
/* Deal with incoming PROTO_LCP */
struct lcpstate *lcp = fsm2lcp(fp);
struct lcp *lcp = fsm2lcp(fp);
int type, length, sz, pos;
u_int32_t *lp, magic, accmap;
u_short mtu, mru, *sp, proto;

View File

@ -15,14 +15,14 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: lcp.h,v 1.16.2.5 1998/02/06 02:24:24 brian Exp $
* $Id: lcp.h,v 1.16.2.6 1998/02/07 20:49:45 brian Exp $
*
* TODO:
*/
#define REJECTED(p, x) ((p)->his_reject & (1<<(x)))
struct lcpstate {
struct lcp {
struct fsm fsm; /* The finite state machine */
u_int16_t his_mru; /* Peers maximum packet size */
u_int32_t his_accmap; /* Peeers async char control map */
@ -72,9 +72,9 @@ struct lcp_opt {
struct physical;
extern struct lcpstate LcpInfo;
extern struct lcp LcpInfo;
#define fsm2lcp(fp) (fp->proto == PROTO_LCP ? (struct lcpstate *)fp : NULL)
#define fsm2lcp(fp) (fp->proto == PROTO_LCP ? (struct lcp *)fp : NULL)
extern void LcpInit(struct bundle *, struct physical *);
extern void LcpUp(void);

View File

@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: main.c,v 1.121.2.11 1998/02/07 20:49:53 brian Exp $
* $Id: main.c,v 1.121.2.12 1998/02/07 22:22:43 brian Exp $
*
* TODO:
* o Add commands for traffic summary, version display, etc.
@ -474,10 +474,10 @@ main(int argc, char **argv)
* embeded load "otherlabel" command.
*/
SetLabel(label);
if (mode & MODE_OUTGOING_DAEMON &&
if (mode & MODE_AUTO &&
IpcpInfo.DefHisAddress.ipaddr.s_addr == INADDR_ANY) {
LogPrintf(LogWARN, "You must \"set ifaddr\" in label %s for"
" auto, background or ddial mode.\n", label);
LogPrintf(LogWARN, "You must \"set ifaddr\" in label %s for auto mode.\n",
label);
Cleanup(EX_START);
}
}