File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / mpd / src / mp.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Jul 22 08:44:29 2013 UTC (10 years, 11 months ago) by misho
Branches: mpd, MAIN
CVS tags: v5_9p16, v5_9, v5_8p7, v5_8p1_cross, v5_8p1, v5_8, v5_7p0, v5_7, v5_6, HEAD
5.7

    1: 
    2: /*
    3:  * mp.h
    4:  *
    5:  * Written by Archie Cobbs <archie@freebsd.org>
    6:  * Copyright (c) 1995-1999 Whistle Communications, Inc. All rights reserved.
    7:  * See ``COPYRIGHT.whistle''
    8:  */
    9: 
   10: #ifndef _MP_H_
   11: #define _MP_H_
   12: 
   13: #include <sys/types.h>
   14: #include "fsm.h"
   15: #include "mbuf.h"
   16: 
   17: /*
   18:  * DEFINITIONS
   19:  */
   20: 
   21: /* Discriminators */
   22: 
   23:   #define MAX_DISCRIM		50
   24: 
   25:   #define DISCRIM_CLASS_NULL	0
   26:   #define DISCRIM_CLASS_LOCAL	1
   27:   #define DISCRIM_CLASS_IPADDR	2
   28:   #define DISCRIM_CLASS_802_1	3
   29:   #define DISCRIM_CLASS_MAGIC	4
   30:   #define DISCRIM_CLASS_PSN	5
   31: 
   32:   struct discrim {
   33:     u_char	len;
   34:     u_char	class;
   35:     u_char	bytes[MAX_DISCRIM];
   36:   };
   37:   typedef struct discrim	*Discrim;
   38: 
   39: /* Bounds on things */
   40: 
   41:   #define MP_MIN_MRRU		LCP_MIN_MRU		/* Per RFC 1990 */
   42:   #define MP_MAX_MRRU		4096
   43:   #define MP_DEFAULT_MRRU	2048
   44: 
   45: /* LCP codes acceptable to transmit over the virtual link */
   46: 
   47:   #define MP_LCP_CODE_OK(c)	((c) >= CODE_CODEREJ && (c) <= CODE_ECHOREP)
   48: 
   49: /*
   50:  * FUNCTIONS
   51:  */
   52: 
   53:   extern void	MpSetDiscrim(void);
   54:   extern int	MpDiscrimEqual(Discrim dis1, Discrim dis2);
   55:   extern char *	MpDiscrimText(Discrim dis, char *buf, size_t len);
   56: 
   57: #endif
   58: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>