sppptun.h revision f53eecf557986dac6ededb388fedd6ca63be0350
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* sppptun.h - ioctl and other miscellaneous definitions for PPP
* tunneling STREAMS module
*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* See also:
* RFC 2341, Cisco Layer Two Forwarding (Protocol) "L2F"
* RFC 2516, A Method for Transmitting PPP Over Ethernet (PPPoE)
* RFC 2637, Point-to-Point Tunneling Protocol (PPTP)
* RFC 2661, Layer Two Tunneling Protocol "L2TP"
*/
#ifndef __SPPPTUN_H
#define __SPPPTUN_H
#include <sys/ethernet.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Device name */
#define PPP_TUN_NAME "sppptun"
/* The constant below is "TUN" in hex. */
#define _PPPTUN(n) (0x54554E00 + (n))
/*
* Except where otherwise noted (mod), these apply to the driver side
* of the PPP tunnel multiplexor.
*/
/* Lower layer link name size */
#define PPPTUNNAMSIZ 32
typedef char ppptun_lname[PPPTUNNAMSIZ];
/*
* For PPPTUN_SNAME, PPPTUN_GNAME, PPPTUN_SDATA, PPPTUN_GDATA,
* PPPTUN_SCTL, PPPTUN_GCTL, and PPPTUN_DCTL, just this structure is
* used.
*
* PPPTUN_GNNAME takes in a single int (0...N) and this structure is
* returned. Use ptn_index to pass in the index.
*/
union ppptun_name {
};
/* PPPTUN_SINFO and PPPTUN_GINFO use this structure */
struct ppptun_info {
};
#define PTS_NONE 0 /* Illegal configuration */
struct ppptun_gre_addr {
struct in6_addr ptga_peer_ip;
};
struct ppptun_mac_addr {
struct ether_addr ptma_mac_ether_addr;
};
/* Values for ptga_version; corresponds to GRE version number */
#define PTGAV_L2F 0x01
#define PTGAV_PPTP 0x01
#define PTGAV_L2TP 0x02
typedef union {
struct ppptun_gre_addr pta_l2f;
struct ppptun_gre_addr pta_l2tp;
struct ppptun_gre_addr pta_pptp;
struct ppptun_mac_addr pta_pppoe;
} ppptun_atype;
/* For PPPTUN_SPEER and PPPTUN_GPEER; the address depends on the style */
struct ppptun_peer {
};
/* For M_PROTO (control message) */
struct ppptun_control {
};
/*
* This value, currently set to the characters "POE1," is used to
* distinguish among control messages from multiple lower streams
* (LAC-like behavior), but isn't currently used.
*/
#define PPPOE_DISCRIM 0x504F4531
#ifdef __cplusplus
}
#endif
#endif /* __SPPPTUN_H */