Annotation of embedaddon/libpdel/ppp/ppp_lcp.h, revision 1.1
1.1 ! misho 1:
! 2: /*
! 3: * Copyright (c) 2001-2002 Packet Design, LLC.
! 4: * All rights reserved.
! 5: *
! 6: * Subject to the following obligations and disclaimer of warranty,
! 7: * use and redistribution of this software, in source or object code
! 8: * forms, with or without modifications are expressly permitted by
! 9: * Packet Design; provided, however, that:
! 10: *
! 11: * (i) Any and all reproductions of the source or object code
! 12: * must include the copyright notice above and the following
! 13: * disclaimer of warranties; and
! 14: * (ii) No rights are granted, in any manner or form, to use
! 15: * Packet Design trademarks, including the mark "PACKET DESIGN"
! 16: * on advertising, endorsements, or otherwise except as such
! 17: * appears in the above copyright notice or in the software.
! 18: *
! 19: * THIS SOFTWARE IS BEING PROVIDED BY PACKET DESIGN "AS IS", AND
! 20: * TO THE MAXIMUM EXTENT PERMITTED BY LAW, PACKET DESIGN MAKES NO
! 21: * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING
! 22: * THIS SOFTWARE, INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED
! 23: * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
! 24: * OR NON-INFRINGEMENT. PACKET DESIGN DOES NOT WARRANT, GUARANTEE,
! 25: * OR MAKE ANY REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS
! 26: * OF THE USE OF THIS SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY,
! 27: * RELIABILITY OR OTHERWISE. IN NO EVENT SHALL PACKET DESIGN BE
! 28: * LIABLE FOR ANY DAMAGES RESULTING FROM OR ARISING OUT OF ANY USE
! 29: * OF THIS SOFTWARE, INCLUDING WITHOUT LIMITATION, ANY DIRECT,
! 30: * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE, OR CONSEQUENTIAL
! 31: * DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF
! 32: * USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY THEORY OF
! 33: * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
! 34: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
! 35: * THE USE OF THIS SOFTWARE, EVEN IF PACKET DESIGN IS ADVISED OF
! 36: * THE POSSIBILITY OF SUCH DAMAGE.
! 37: *
! 38: * Author: Archie Cobbs <archie@freebsd.org>
! 39: */
! 40:
! 41: #ifndef _PDEL_PPP_PPP_LCP_H_
! 42: #define _PDEL_PPP_PPP_LCP_H_
! 43:
! 44: struct ppp_fsm;
! 45: struct ppp_node;
! 46:
! 47: /*
! 48: * LCP constants
! 49: */
! 50: #define LCP_MIN_MRU 64
! 51: #define LCP_MAX_MRU 8192
! 52: #define LCP_DEFAULT_MRU 1500
! 53:
! 54: #define LCP_MIN_MRRU 1500
! 55: #define LCP_MAX_MRRU 8192
! 56: #define LCP_DEFAULT_MRRU 1600
! 57:
! 58: /*
! 59: * Configuration for an LCP FSM
! 60: */
! 61: struct ppp_lcp_config {
! 62:
! 63: u_int16_t min_mru[2];
! 64: u_int16_t max_mru[2];
! 65: u_int16_t min_mrru[2];
! 66: u_int16_t max_mrru[2];
! 67:
! 68: u_int32_t accm;
! 69:
! 70: u_char auth[2][PPP_AUTH_MAX];
! 71:
! 72: u_char multilink[2]; /* request, both, or neither */
! 73: u_char shortseq[2];
! 74: u_char pfcomp[2];
! 75: u_char acfcomp[2];
! 76:
! 77: struct ppp_eid eid;
! 78: };
! 79:
! 80: /*
! 81: * LCP request state
! 82: */
! 83: struct ppp_lcp_req {
! 84: u_int16_t mru[2];
! 85: u_int32_t accm[2];
! 86: u_char acfcomp[2];
! 87: u_char pfcomp[2];
! 88: u_int32_t magic[2];
! 89: enum ppp_auth_index auth[2];
! 90: u_char auth_rej[PPP_AUTH_MAX];
! 91: u_char multilink[2];
! 92: u_int16_t mrru[2];
! 93: u_char shortseq[2];
! 94: struct ppp_eid eid[2];
! 95: };
! 96:
! 97: __BEGIN_DECLS
! 98:
! 99: /* FSM types for LCP (normal) and MP LCP (multilink-bundle) */
! 100: extern const struct ppp_fsm_type ppp_fsm_lcp;
! 101: extern const struct ppp_fsm_type ppp_fsm_mp_lcp;
! 102:
! 103: /* LCP option descriptors */
! 104: extern const struct ppp_fsm_optdesc lcp_opt_desc[];
! 105:
! 106: /* Functions */
! 107: extern struct ppp_fsm_instance *ppp_lcp_create(struct ppp_lcp_config *conf);
! 108: extern void ppp_lcp_get_req(struct ppp_fsm *lcp, struct ppp_lcp_req *req);
! 109:
! 110: __END_DECLS
! 111:
! 112: #endif /* _PDEL_PPP_PPP_LCP_H_ */
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>