17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * ipcp.h - IP Control Protocol definitions. 37c478bd9Sstevel@tonic-gate * 4*f53eecf5SJames Carlson * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 5*f53eecf5SJames Carlson * Use is subject to license terms. 67c478bd9Sstevel@tonic-gate * 77c478bd9Sstevel@tonic-gate * Copyright (c) 1989 Carnegie Mellon University. 87c478bd9Sstevel@tonic-gate * All rights reserved. 97c478bd9Sstevel@tonic-gate * 107c478bd9Sstevel@tonic-gate * Redistribution and use in source and binary forms are permitted 117c478bd9Sstevel@tonic-gate * provided that the above copyright notice and this paragraph are 127c478bd9Sstevel@tonic-gate * duplicated in all such forms and that any documentation, 137c478bd9Sstevel@tonic-gate * advertising materials, and other materials related to such 147c478bd9Sstevel@tonic-gate * distribution and use acknowledge that the software was developed 157c478bd9Sstevel@tonic-gate * by Carnegie Mellon University. The name of the 167c478bd9Sstevel@tonic-gate * University may not be used to endorse or promote products derived 177c478bd9Sstevel@tonic-gate * from this software without specific prior written permission. 187c478bd9Sstevel@tonic-gate * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 197c478bd9Sstevel@tonic-gate * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 207c478bd9Sstevel@tonic-gate * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 217c478bd9Sstevel@tonic-gate * 227c478bd9Sstevel@tonic-gate * $Id: ipcp.h,v 1.13 1999/03/02 05:35:09 paulus Exp $ 237c478bd9Sstevel@tonic-gate */ 247c478bd9Sstevel@tonic-gate 257c478bd9Sstevel@tonic-gate /* 267c478bd9Sstevel@tonic-gate * Options. 277c478bd9Sstevel@tonic-gate */ 287c478bd9Sstevel@tonic-gate #define CI_ADDRS 1 /* IP Addresses */ 297c478bd9Sstevel@tonic-gate #define CI_COMPRESSTYPE 2 /* Compression Type */ 307c478bd9Sstevel@tonic-gate #define CI_ADDR 3 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gate #define CI_MS_DNS1 129 /* Primary DNS value */ 337c478bd9Sstevel@tonic-gate #define CI_MS_WINS1 130 /* Primary WINS value */ 347c478bd9Sstevel@tonic-gate #define CI_MS_DNS2 131 /* Secondary DNS value */ 357c478bd9Sstevel@tonic-gate #define CI_MS_WINS2 132 /* Secondary WINS value */ 367c478bd9Sstevel@tonic-gate #define CI_SUBNET 144 /* Bogus subnet option */ 377c478bd9Sstevel@tonic-gate 387c478bd9Sstevel@tonic-gate #define MAX_STATES 16 /* from slcompress.h */ 397c478bd9Sstevel@tonic-gate 407c478bd9Sstevel@tonic-gate #define IPCP_VJMODE_OLD 1 /* "old" mode (option # = 0x0037) */ 417c478bd9Sstevel@tonic-gate #define IPCP_VJMODE_RFC1172 2 /* "old-rfc"mode (option # = 0x002d) */ 427c478bd9Sstevel@tonic-gate #define IPCP_VJMODE_RFC1332 3 /* "new-rfc"mode (option # = 0x002d, */ 437c478bd9Sstevel@tonic-gate /* maxslot and slot number compression) */ 447c478bd9Sstevel@tonic-gate 457c478bd9Sstevel@tonic-gate #define IPCP_VJ_COMP 0x002d /* current value for VJ compression option*/ 467c478bd9Sstevel@tonic-gate #define IPCP_VJ_COMP_OLD 0x0037 /* "old" (i.e, broken) value for VJ */ 477c478bd9Sstevel@tonic-gate /* compression option*/ 487c478bd9Sstevel@tonic-gate 497c478bd9Sstevel@tonic-gate typedef struct ipcp_options { 507c478bd9Sstevel@tonic-gate bool neg_addr; /* Negotiate IP Address? */ 517c478bd9Sstevel@tonic-gate bool old_addrs; /* Use old (IP-Addresses) option? */ 527c478bd9Sstevel@tonic-gate bool req_addr; /* Ask peer to send IP address? */ 537c478bd9Sstevel@tonic-gate bool default_route; /* Assign default route through interface? */ 547c478bd9Sstevel@tonic-gate bool proxy_arp; /* Make proxy ARP entry for peer? */ 557c478bd9Sstevel@tonic-gate bool neg_vj; /* Van Jacobson Compression? */ 567c478bd9Sstevel@tonic-gate bool old_vj; /* use old (short) form of VJ option? */ 577c478bd9Sstevel@tonic-gate bool accept_local; /* accept peer's value for ouraddr */ 587c478bd9Sstevel@tonic-gate bool accept_remote; /* accept peer's value for hisaddr */ 597c478bd9Sstevel@tonic-gate bool req_dns1; /* Ask peer to send primary DNS address? */ 607c478bd9Sstevel@tonic-gate bool req_dns2; /* Ask peer to send secondary DNS address? */ 617c478bd9Sstevel@tonic-gate bool cflag; /* VJ slot compression flag */ 627c478bd9Sstevel@tonic-gate int vj_protocol; /* protocol value to use in VJ option */ 637c478bd9Sstevel@tonic-gate int maxslotindex; /* values for RFC1332 VJ compression neg. */ 647c478bd9Sstevel@tonic-gate u_int32_t ouraddr, hisaddr; /* Addresses in NETWORK BYTE ORDER */ 657c478bd9Sstevel@tonic-gate u_int32_t dnsaddr[2]; /* Primary and secondary MS DNS entries */ 667c478bd9Sstevel@tonic-gate u_int32_t winsaddr[2]; /* Primary and secondary MS WINS entries */ 677c478bd9Sstevel@tonic-gate } ipcp_options; 687c478bd9Sstevel@tonic-gate 697c478bd9Sstevel@tonic-gate extern fsm ipcp_fsm[]; 707c478bd9Sstevel@tonic-gate extern ipcp_options ipcp_wantoptions[]; 717c478bd9Sstevel@tonic-gate extern ipcp_options ipcp_gotoptions[]; 727c478bd9Sstevel@tonic-gate extern ipcp_options ipcp_allowoptions[]; 737c478bd9Sstevel@tonic-gate extern ipcp_options ipcp_hisoptions[]; 747c478bd9Sstevel@tonic-gate 757c478bd9Sstevel@tonic-gate extern char *ip_ntoa __P((u_int32_t)); 76*f53eecf5SJames Carlson extern char *tcp_flag_decode __P((int)); 777c478bd9Sstevel@tonic-gate 787c478bd9Sstevel@tonic-gate extern struct protent ipcp_protent; 797c478bd9Sstevel@tonic-gate extern bool ipcp_from_hostname; 80