2132 lines
58 KiB
C
2132 lines
58 KiB
C
/* ipl2tp_attr.h - IPL2TP attribute routines. */
|
|
|
|
/*
|
|
DESCRIPTION
|
|
An API for IPLT2P attributes.
|
|
*/
|
|
|
|
/*
|
|
******************************************************************************
|
|
* HEADER FILE
|
|
*
|
|
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipl2tp_attr.h,v $ $Revision: 1.7 $
|
|
* $Source: /home/interpeak/CVSRoot/ipl2tp/include/ipl2tp_attr.h,v $
|
|
* $Author: tneale $ $Date: 2009-10-27 14:37:05 $
|
|
* $State: Exp $ $Locker: $
|
|
*
|
|
* INTERPEAK_COPYRIGHT_STRING
|
|
* Design and implementation by Joel Hortelius <joel.hortelius@interpeak.se>
|
|
******************************************************************************
|
|
*/
|
|
#ifndef IPL2TP_ATTR_H
|
|
#define IPL2TP_ATTR_H
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 1 DESCRIPTION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 2 CONFIGURATION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 3 INCLUDE FILES
|
|
****************************************************************************
|
|
*/
|
|
#include "ipcom_type.h"
|
|
#include "ipcom_cstyle.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 4 DEFINES
|
|
****************************************************************************
|
|
*/
|
|
|
|
/* Attribute object flags */
|
|
#define IPL2TP_ATTR_FIXED 0x0001
|
|
|
|
|
|
#define IPL2TP_ATTR_CIRCUIT_STATUS_ACTIVE (1 << 15)
|
|
#define IPL2TP_ATTR_CIRCUIT_STATUS_NEW (1 << 14)
|
|
|
|
|
|
#define IPL2TP_ATTR_DATA_SEQUENCING_NEVER 0
|
|
#define IPL2TP_ATTR_DATA_SEQUENCING_NONIPONLY 1
|
|
#define IPL2TP_ATTR_DATA_SEQUENCING_ALWAYS 2
|
|
|
|
#define IPL2TP_ATTR_L2_SUBLAYER_NONE 0
|
|
#define IPL2TP_ATTR_L2_SUBLAYER_DEFAULT 1
|
|
|
|
#define IPL2TP_ATTR_TRANSPORT_UDP 0
|
|
#define IPL2TP_ATTR_TRANSPORT_IP 1
|
|
|
|
|
|
/* Currently known PW types; NOTE that most of these are still draft */
|
|
#define IPL2TP_ATTR_PW_TYPE_FRAME_RELAY 0x0001
|
|
#define IPL2TP_ATTR_PW_TYPE_ATM_AAL5_SDU_VCC 0x0002
|
|
#define IPL2TP_ATTR_PW_TYPE_ATM_CELL_PORT_MODE 0x0003
|
|
#define IPL2TP_ATTR_PW_TYPE_ETHERNET_VLAN 0x0004
|
|
#define IPL2TP_ATTR_PW_TYPE_ETHERNET 0x0005
|
|
#define IPL2TP_ATTR_PW_TYPE_HDLC 0x0006
|
|
#define IPL2TP_ATTR_PW_TYPE_PPP 0x0007
|
|
#define IPL2TP_ATTR_PW_TYPE_ATM_CELL_VCC_MODE 0x0009
|
|
#define IPL2TP_ATTR_PW_TYPE_ATM_CELL_VPC_MODE 0x000A
|
|
|
|
|
|
/* Aliases for RW attributes */
|
|
|
|
#define IPL2TP_ATTR_TYPE_NONE 0
|
|
#define IPL2TP_ATTR_TYPE_STRING 1
|
|
#define IPL2TP_ATTR_TYPE_SEC 2
|
|
#define IPL2TP_ATTR_TYPE_INT 3
|
|
#define IPL2TP_ATTR_TYPE_INT64 4
|
|
#define IPL2TP_ATTR_TYPE_ADDRESS 5
|
|
#define IPL2TP_ATTR_TYPE_KEY 6
|
|
#define IPL2TP_ATTR_TYPE_FUNCTION 7
|
|
#define IPL2TP_ATTR_TYPE_POINTER 8
|
|
#define IPL2TP_ATTR_TYPE_VECTOR 9
|
|
#define IPL2TP_ATTR_TYPE_VEC8 10
|
|
#define IPL2TP_ATTR_TYPE_VEC16 11
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 5 TYPES
|
|
****************************************************************************
|
|
*/
|
|
typedef enum
|
|
{
|
|
/* Global tags */
|
|
IPL2TP_ATTR_START_ENUM = 0,
|
|
IPL2TP_ATTR_RW_HOST_NAME,
|
|
IPL2TP_ATTR_RO_l2tpVendorName,
|
|
IPL2TP_ATTR_RO_l2tpFirmwareRev,
|
|
IPL2TP_ATTR_RO_l2tpProtocolVersion,
|
|
IPL2TP_ATTR_RW_FIRST_RETRANSMIT_SEC,
|
|
IPL2TP_ATTR_RW_TUNNEL_ZOMBIE_SEC,
|
|
IPL2TP_ATTR_RW_HELLO_TICK_SEC,
|
|
IPL2TP_ATTR_RW_ESTABLISH_TIMEOUT_SEC,
|
|
IPL2TP_ATTR_RW_ENABLE_OUTGOING,
|
|
IPL2TP_ATTR_RW_L2TP_WRITE_CALLBACK,
|
|
IPL2TP_ATTR_RW_OPEN_EXCLUSIVE,
|
|
IPL2TP_ATTR_RW_l2tpAdminState,
|
|
IPL2TP_ATTR_RW_l2tpDrainTunnels,
|
|
IPL2TP_ATTR_RO_l2tpDrainingTunnels,
|
|
IPL2TP_ATTR_RO_OPEN_TUNNELS,
|
|
IPL2TP_ATTR_RO_OPEN_SESSIONS,
|
|
|
|
IPL2TP_ATTR_RW_CLOSE_UNUSED_TUNNELS,
|
|
IPL2TP_ATTR_RW_ENABLE_L2TP_V2,
|
|
IPL2TP_ATTR_RW_ENABLE_L2TP_V3,
|
|
|
|
/* End marker */
|
|
IPL2TP_ATTR_END_ENUM
|
|
}
|
|
Ipl2tp_tag;
|
|
|
|
/* R/W ALIASES */
|
|
#define IPL2TP_ATTR_SET_HOST_NAME \
|
|
IPL2TP_ATTR_RW_HOST_NAME
|
|
#define IPL2TP_ATTR_SET_FIRST_RETRANSMIT_SEC \
|
|
IPL2TP_ATTR_RW_FIRST_RETRANSMIT_SEC
|
|
#define IPL2TP_ATTR_SET_TUNNEL_ZOMBIE_SEC \
|
|
IPL2TP_ATTR_RW_TUNNEL_ZOMBIE_SEC
|
|
#define IPL2TP_ATTR_SET_HELLO_TICK_SEC \
|
|
IPL2TP_ATTR_RW_HELLO_TICK_SEC
|
|
#define IPL2TP_ATTR_SET_ESTABLISH_TIMEOUT_SEC \
|
|
IPL2TP_ATTR_RW_ESTABLISH_TIMEOUT_SEC
|
|
#define IPL2TP_ATTR_SET_ENABLE_OUTGOING \
|
|
IPL2TP_ATTR_RW_ENABLE_OUTGOING
|
|
#define IPL2TP_ATTR_SET_ENABLE_OUTGOING \
|
|
IPL2TP_ATTR_RW_ENABLE_OUTGOING
|
|
#define IPL2TP_ATTR_SET_L2TP_WRITE_CALLBACK \
|
|
IPL2TP_ATTR_RW_L2TP_WRITE_CALLBACK
|
|
#define IPL2TP_ATTR_SET_OPEN_EXCLUSIVE \
|
|
IPL2TP_ATTR_RW_OPEN_EXCLUSIVE
|
|
#define IPL2TP_ATTR_SET_l2tpAdminState \
|
|
IPL2TP_ATTR_RW_l2tpAdminState
|
|
#define IPL2TP_ATTR_SET_l2tpDrainTunnels \
|
|
IPL2TP_ATTR_RW_l2tpDrainTunnels
|
|
#define IPL2TP_ATTR_SET_ENABLE_L2TP_V2 \
|
|
IPL2TP_ATTR_RW_ENABLE_L2TP_V2
|
|
#define IPL2TP_ATTR_SET_ENABLE_L2TP_V3 \
|
|
IPL2TP_ATTR_RW_ENABLE_L2TP_V3
|
|
#define IPL2TP_ATTR_SET_CLOSE_UNUSED_TUNNELS \
|
|
IPL2TP_ATTR_RW_CLOSE_UNUSED_TUNNELS
|
|
|
|
#define IPL2TP_ATTR_GET_HOST_NAME \
|
|
IPL2TP_ATTR_RW_HOST_NAME
|
|
#define IPL2TP_ATTR_GET_FIRST_RETRANSMIT_SEC \
|
|
IPL2TP_ATTR_RW_FIRST_RETRANSMIT_SEC
|
|
#define IPL2TP_ATTR_GET_TUNNEL_ZOMBIE_SEC \
|
|
IPL2TP_ATTR_RW_TUNNEL_ZOMBIE_SEC
|
|
#define IPL2TP_ATTR_GET_HELLO_TICK_SEC \
|
|
IPL2TP_ATTR_RW_HELLO_TICK_SEC
|
|
#define IPL2TP_ATTR_GET_ESTABLISH_TIMEOUT_SEC \
|
|
IPL2TP_ATTR_RW_ESTABLISH_TIMEOUT_SEC
|
|
#define IPL2TP_ATTR_GET_ENABLE_OUTGOING \
|
|
IPL2TP_ATTR_RW_ENABLE_OUTGOING
|
|
#define IPL2TP_ATTR_GET_ENABLE_OUTGOING \
|
|
IPL2TP_ATTR_RW_ENABLE_OUTGOING
|
|
#define IPL2TP_ATTR_GET_L2TP_WRITE_CALLBACK \
|
|
IPL2TP_ATTR_RW_L2TP_WRITE_CALLBACK
|
|
#define IPL2TP_ATTR_GET_OPEN_EXCLUSIVE \
|
|
IPL2TP_ATTR_RW_OPEN_EXCLUSIVE
|
|
#define IPL2TP_ATTR_GET_l2tpAdminState \
|
|
IPL2TP_ATTR_RW_l2tpAdminState
|
|
#define IPL2TP_ATTR_GET_l2tpDrainTunnels \
|
|
IPL2TP_ATTR_RW_l2tpDrainTunnels
|
|
#define IPL2TP_ATTR_GET_ENABLE_L2TP_V2 \
|
|
IPL2TP_ATTR_RW_ENABLE_L2TP_V2
|
|
#define IPL2TP_ATTR_GET_ENABLE_L2TP_V3 \
|
|
IPL2TP_ATTR_RW_ENABLE_L2TP_V3
|
|
#define IPL2TP_ATTR_GET_CLOSE_UNUSED_TUNNELS \
|
|
IPL2TP_ATTR_RW_CLOSE_UNUSED_TUNNELS
|
|
|
|
|
|
/* R/O ALIASES */
|
|
#define IPL2TP_ATTR_GET_l2tpVendorName \
|
|
IPL2TP_ATTR_RO_l2tpVendorName
|
|
#define IPL2TP_ATTR_GET_l2tpFirmwareRev \
|
|
IPL2TP_ATTR_RO_l2tpFirmwareRev
|
|
#define IPL2TP_ATTR_GET_l2tpProtocolVersion \
|
|
IPL2TP_ATTR_RO_l2tpProtocolVersion
|
|
#define IPL2TP_ATTR_GET_l2tpDrainingTunnels \
|
|
IPL2TP_ATTR_RO_l2tpDrainingTunnels
|
|
#define IPL2TP_ATTR_GET_OPEN_TUNNELS \
|
|
IPL2TP_ATTR_RO_OPEN_TUNNELS
|
|
#define IPL2TP_ATTR_GET_OPEN_SESSIONS \
|
|
IPL2TP_ATTR_RO_OPEN_SESSIONS
|
|
|
|
|
|
typedef enum
|
|
{
|
|
/* Tunnel tags */
|
|
IPL2TP_TATTR_START_ENUM = 1000,
|
|
IPL2TP_TATTR_RW_PEER_HOST_NAME,
|
|
IPL2TP_TATTR_RW_BEARER_CAPABILITIES,
|
|
IPL2TP_TATTR_RW_FRAMING_CAPABILITIES,
|
|
IPL2TP_TATTR_RW_LOCAL_ROUTER_ID,
|
|
IPL2TP_TATTR_RW_LOCAL_PREFERRED_LANGUAGE,
|
|
IPL2TP_TATTR_RW_LOCAL_PSEUDOWIRE_CAPABILITIES_LIST,
|
|
IPL2TP_TATTR_RW_HIDE_AVP,
|
|
IPL2TP_TATTR_RW_STATUS_CALLBACK,
|
|
IPL2TP_TATTR_RW_USER_DATA,
|
|
IPL2TP_TATTR_RW_HMAC,
|
|
IPL2TP_TATTR_RW_TRANSPORT,
|
|
IPL2TP_TATTR_RW_ifAdminStatus,
|
|
IPL2TP_TATTR_RW_tunnelIfIndex,
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigAuthentication,
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigSecret,
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigHelloInterval,
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigIdleTimeout,
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigControlRWS,
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigControlMaxRetransmissions,
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigControlMaxRetransmissionTimeout,
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigPayloadSequencing,
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigReassemblyTimeout,
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigDrainTunnel,
|
|
|
|
IPL2TP_TATTR_RO_ifDescr,
|
|
IPL2TP_TATTR_RO_ifOperStatus,
|
|
IPL2TP_TATTR_RO_ifInOctets,
|
|
IPL2TP_TATTR_RO_ifInUcastPkts,
|
|
IPL2TP_TATTR_RO_ifInDiscards,
|
|
IPL2TP_TATTR_RO_ifInErrors,
|
|
IPL2TP_TATTR_RO_ifOutOctets,
|
|
IPL2TP_TATTR_RO_ifOutUcastPkts,
|
|
IPL2TP_TATTR_RO_tunnelRemoteAddress,
|
|
IPL2TP_TATTR_RO_tunnelEncapsMethod,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsLocalTID,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsRemoteTID,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsState,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsInitiated,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsRemoteHostName,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsRemoteVendorName,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsRemoteFirmwareRevision,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsRemoteProtocolVersion,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsInitialRemoteRWS,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsControlRecvPackets,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsControlRecvZLB,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsControlOutOfSequence,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsControlOutOfWindow,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsControlSendPackets,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsControlSendZLB,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsControlAckTimeouts,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsCurrentRemoteRWS,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsSendSeq,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsSendSeqAck,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsRecvSeq,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsRecvSeqAck,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsTotalSessions,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsFailedSessions,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsActiveSessions,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsLastResultCode,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsLastErrorCode,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsLastErrorMessage,
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsDrainingTunnel,
|
|
|
|
IPL2TP_TATTR_RO_REMOTE_ROUTER_ID,
|
|
IPL2TP_TATTR_RO_REMOTE_PSEUDOWIRE_CAPABILITIES_LIST,
|
|
IPL2TP_TATTR_RO_REMOTE_PREFERRED_LANGUAGE,
|
|
|
|
/* End marker */
|
|
IPL2TP_TATTR_END_ENUM
|
|
}
|
|
Ipl2tp_tunnel_tag;
|
|
|
|
/* Aliases */
|
|
|
|
/* R/W TUNNEL ALIASES */
|
|
#define IPL2TP_TATTR_SET_PEER_HOST_NAME \
|
|
IPL2TP_TATTR_RW_PEER_HOST_NAME
|
|
#define IPL2TP_TATTR_SET_BEARER_CAPABILITIES \
|
|
IPL2TP_TATTR_RW_BEARER_CAPABILITIES
|
|
#define IPL2TP_TATTR_SET_FRAMING_CAPABILITIES \
|
|
IPL2TP_TATTR_RW_FRAMING_CAPABILITIES
|
|
#define IPL2TP_TATTR_SET_LOCAL_ROUTER_ID \
|
|
IPL2TP_TATTR_RW_LOCAL_ROUTER_ID
|
|
#define IPL2TP_TATTR_SET_LOCAL_PREFERRED_LANGUAGE \
|
|
IPL2TP_TATTR_RW_LOCAL_PREFERRED_LANGUAGE
|
|
#define IPL2TP_TATTR_SET_LOCAL_PSEUDOWIRE_CAPABILITIES_LIST \
|
|
IPL2TP_TATTR_RW_LOCAL_PSEUDOWIRE_CAPABILITIES_LIST
|
|
#define IPL2TP_TATTR_SET_HIDE_AVP \
|
|
IPL2TP_TATTR_RW_HIDE_AVP
|
|
#define IPL2TP_TATTR_SET_STATUS_CALLBACK \
|
|
IPL2TP_TATTR_RW_STATUS_CALLBACK
|
|
#define IPL2TP_TATTR_SET_USER_DATA \
|
|
IPL2TP_TATTR_RW_USER_DATA
|
|
#define IPL2TP_TATTR_SET_HMAC \
|
|
IPL2TP_TATTR_RW_HMAC
|
|
#define IPL2TP_TATTR_SET_TRANSPORT \
|
|
IPL2TP_TATTR_RW_TRANSPORT
|
|
#define IPL2TP_TATTR_SET_ifAdminStatus \
|
|
IPL2TP_TATTR_RW_ifAdminStatus
|
|
#define IPL2TP_TATTR_SET_tunnelIfIndex \
|
|
IPL2TP_TATTR_RW_tunnelIfIndex
|
|
#define IPL2TP_TATTR_SET_l2tpTunnelConfigAuthentication \
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigAuthentication
|
|
#define IPL2TP_TATTR_SET_l2tpTunnelConfigSecret \
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigSecret
|
|
#define IPL2TP_TATTR_SET_l2tpTunnelConfigHelloInterval \
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigHelloInterval
|
|
#define IPL2TP_TATTR_SET_l2tpTunnelConfigIdleTimeout \
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigIdleTimeout
|
|
#define IPL2TP_TATTR_SET_l2tpTunnelConfigControlRWS \
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigControlRWS
|
|
#define IPL2TP_TATTR_SET_l2tpTunnelConfigControlMaxRetransmissions \
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigControlMaxRetransmissions
|
|
#define IPL2TP_TATTR_SET_l2tpTunnelConfigControlMaxRetransmissionTimeout \
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigControlMaxRetransmissionTimeout
|
|
#define IPL2TP_TATTR_SET_l2tpTunnelConfigPayloadSequencing \
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigPayloadSequencing
|
|
#define IPL2TP_TATTR_SET_l2tpTunnelConfigReassemblyTimeout \
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigReassemblyTimeout
|
|
#define IPL2TP_TATTR_SET_l2tpTunnelConfigDrainTunnel \
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigDrainTunnel
|
|
|
|
#define IPL2TP_TATTR_GET_PEER_HOST_NAME \
|
|
IPL2TP_TATTR_RW_PEER_HOST_NAME
|
|
#define IPL2TP_TATTR_GET_BEARER_CAPABILITIES \
|
|
IPL2TP_TATTR_RW_BEARER_CAPABILITIES
|
|
#define IPL2TP_TATTR_GET_FRAMING_CAPABILITIES \
|
|
IPL2TP_TATTR_RW_FRAMING_CAPABILITIES
|
|
#define IPL2TP_TATTR_GET_LOCAL_ROUTER_ID \
|
|
IPL2TP_TATTR_RW_LOCAL_ROUTER_ID
|
|
#define IPL2TP_TATTR_GET_LOCAL_PREFERRED_LANGUAGE \
|
|
IPL2TP_TATTR_RW_LOCAL_PREFERRED_LANGUAGE
|
|
#define IPL2TP_TATTR_GET_LOCAL_PSEUDOWIRE_CAPABILITIES_LIST \
|
|
IPL2TP_TATTR_RW_LOCAL_PSEUDOWIRE_CAPABILITIES_LIST
|
|
#define IPL2TP_TATTR_GET_HIDE_AVP \
|
|
IPL2TP_TATTR_RW_HIDE_AVP
|
|
#define IPL2TP_TATTR_GET_STATUS_CALLBACK \
|
|
IPL2TP_TATTR_RW_STATUS_CALLBACK
|
|
#define IPL2TP_TATTR_GET_USER_DATA \
|
|
IPL2TP_TATTR_RW_USER_DATA
|
|
#define IPL2TP_TATTR_GET_HMAC \
|
|
IPL2TP_TATTR_RW_HMAC
|
|
#define IPL2TP_TATTR_GET_TRANSPORT \
|
|
IPL2TP_TATTR_RW_TRANSPORT
|
|
#define IPL2TP_TATTR_GET_ifAdminStatus \
|
|
IPL2TP_TATTR_RW_ifAdminStatus
|
|
#define IPL2TP_TATTR_GET_tunnelIfIndex \
|
|
IPL2TP_TATTR_RW_tunnelIfIndex
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelConfigAuthentication \
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigAuthentication
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelConfigSecret \
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigSecret
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelConfigHelloInterval \
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigHelloInterval
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelConfigIdleTimeout \
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigIdleTimeout
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelConfigControlRWS \
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigControlRWS
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelConfigControlMaxRetransmissions \
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigControlMaxRetransmissions
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelConfigControlMaxRetransmissionTimeout \
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigControlMaxRetransmissionTimeout
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelConfigPayloadSequencing \
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigPayloadSequencing
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelConfigReassemblyTimeout \
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigReassemblyTimeout
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelConfigDrainTunnel \
|
|
IPL2TP_TATTR_RW_l2tpTunnelConfigDrainTunnel
|
|
|
|
/* R/O TUNNEL ALIASES */
|
|
#define IPL2TP_TATTR_GET_ifDescr \
|
|
IPL2TP_TATTR_RO_ifDescr
|
|
#define IPL2TP_TATTR_GET_ifOperStatus \
|
|
IPL2TP_TATTR_RO_ifOperStatus
|
|
#define IPL2TP_TATTR_GET_ifInOctets \
|
|
IPL2TP_TATTR_RO_ifInOctets
|
|
#define IPL2TP_TATTR_GET_ifInUcastPkts \
|
|
IPL2TP_TATTR_RO_ifInUcastPkts
|
|
#define IPL2TP_TATTR_GET_ifInDiscards \
|
|
IPL2TP_TATTR_RO_ifInDiscards
|
|
#define IPL2TP_TATTR_GET_ifInErrors \
|
|
IPL2TP_TATTR_RO_ifInErrors
|
|
#define IPL2TP_TATTR_GET_ifOutOctets \
|
|
IPL2TP_TATTR_RO_ifOutOctets
|
|
#define IPL2TP_TATTR_GET_ifOutUcastPkts \
|
|
IPL2TP_TATTR_RO_ifOutUcastPkts
|
|
#define IPL2TP_TATTR_GET_tunnelRemoteAddress \
|
|
IPL2TP_TATTR_RO_tunnelRemoteAddress
|
|
#define IPL2TP_TATTR_GET_tunnelEncapsMethod \
|
|
IPL2TP_TATTR_RO_tunnelEncapsMethod
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsLocalTID \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsLocalTID
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsRemoteTID \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsRemoteTID
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsState \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsState
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsInitiated \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsInitiated
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsRemoteHostName \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsRemoteHostName
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsRemoteVendorName \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsRemoteVendorName
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsRemoteFirmwareRevision \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsRemoteFirmwareRevision
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsRemoteProtocolVersion \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsRemoteProtocolVersion
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsInitialRemoteRWS \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsInitialRemoteRWS
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsControlRecvPackets \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsControlRecvPackets
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsControlRecvZLB \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsControlRecvZLB
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsControlOutOfSequence \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsControlOutOfSequence
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsControlOutOfWindow \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsControlOutOfWindow
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsControlSendPackets \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsControlSendPackets
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsControlSendZLB \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsControlSendZLB
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsControlAckTimeouts \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsControlAckTimeouts
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsCurrentRemoteRWS \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsCurrentRemoteRWS
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsSendSeq \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsSendSeq
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsSendSeqAck \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsSendSeqAck
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsRecvSeq \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsRecvSeq
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsRecvSeqAck \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsRecvSeqAck
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsTotalSessions \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsTotalSessions
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsFailedSessions \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsFailedSessions
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsActiveSessions \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsActiveSessions
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsLastResultCode \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsLastResultCode
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsLastErrorCode \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsLastErrorCode
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsLastErrorMessage \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsLastErrorMessage
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsDrainingTunnel \
|
|
IPL2TP_TATTR_RO_l2tpTunnelStatsDrainingTunnel
|
|
#define IPL2TP_TATTR_GET_REMOTE_ROUTER_ID \
|
|
IPL2TP_TATTR_RO_REMOTE_ROUTER_ID
|
|
#define IPL2TP_TATTR_GET_REMOTE_PSEUDOWIRE_CAPABILITIES_LIST \
|
|
IPL2TP_TATTR_RO_REMOTE_PSEUDOWIRE_CAPABILITIES_LIST
|
|
#define IPL2TP_TATTR_GET_REMOTE_PREFERRED_LANGUAGE \
|
|
IPL2TP_TATTR_RO_REMOTE_PREFERRED_LANGUAGE
|
|
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsFramingCapabilities \
|
|
IPL2TP_TATTR_RW_FRAMING_CAPABILITIES
|
|
#define IPL2TP_TATTR_GET_l2tpTunnelStatsBearerCapabilities \
|
|
IPL2TP_TATTR_RW_BEARER_CAPABILITIES
|
|
|
|
|
|
typedef enum
|
|
{
|
|
/* Session tags */
|
|
IPL2TP_SATTR_START_ENUM = 2000,
|
|
IPL2TP_SATTR_RW_STATUS_CALLBACK,
|
|
IPL2TP_SATTR_RW_DATA_CALLBACK,
|
|
IPL2TP_SATTR_RW_SLI_CALLBACK,
|
|
IPL2TP_SATTR_RW_USER_DATA,
|
|
IPL2TP_SATTR_RW_TX_CONNECT_SPEED,
|
|
IPL2TP_SATTR_RW_RX_CONNECT_SPEED,
|
|
IPL2TP_SATTR_RW_FRAMING_TYPE,
|
|
IPL2TP_SATTR_RW_BEARER_TYPE,
|
|
IPL2TP_SATTR_RW_CALLED_NUMBER,
|
|
IPL2TP_SATTR_RW_CALLING_NUMBER,
|
|
IPL2TP_SATTR_RW_PHYS_CHAN_ID,
|
|
IPL2TP_SATTR_RW_SUB_ADDRESS,
|
|
IPL2TP_SATTR_RW_PRIVATE_GROUP_ID,
|
|
IPL2TP_SATTR_RW_AUTH_METHOD,
|
|
IPL2TP_SATTR_RW_FIRST_RECEIVED_CONFREQ,
|
|
IPL2TP_SATTR_RW_LAST_RECEIVED_CONFREQ,
|
|
IPL2TP_SATTR_RW_LAST_SENT_CONFREQ,
|
|
IPL2TP_SATTR_RW_PROXY_AUTHEN_NAME,
|
|
IPL2TP_SATTR_RW_PROXY_AUTHEN_ID,
|
|
IPL2TP_SATTR_RW_PROXY_AUTHEN_CHALLENGE,
|
|
IPL2TP_SATTR_RW_PROXY_AUTHEN_RESPONSE,
|
|
IPL2TP_SATTR_RW_l2tpSessionStatsIfIndex,
|
|
IPL2TP_SATTR_RW_PSEUDOWIRE_TYPE,
|
|
IPL2TP_SATTR_RW_REMOTE_END_ID,
|
|
IPL2TP_SATTR_RW_LOCAL_CIRCUIT_STATUS,
|
|
IPL2TP_SATTR_RW_DATA_SEQUENCING,
|
|
IPL2TP_SATTR_RW_L2_SUBLAYER,
|
|
IPL2TP_SATTR_RW_TX_CONNECT_SPEED64,
|
|
IPL2TP_SATTR_RW_RX_CONNECT_SPEED64,
|
|
IPL2TP_SATTR_RW_MINIMUM_BPS,
|
|
IPL2TP_SATTR_RW_MAXIMUM_BPS,
|
|
IPL2TP_SATTR_RW_L2_OUT_OF_ORDER_RESET,
|
|
|
|
IPL2TP_SATTR_RO_l2tpSessionStatsTunnelIfIndex,
|
|
IPL2TP_SATTR_RO_l2tpSessionStatsLocalSID,
|
|
IPL2TP_SATTR_RO_l2tpSessionStatsRemoteSID,
|
|
IPL2TP_SATTR_RO_l2tpSessionStatsUserName,
|
|
IPL2TP_SATTR_RO_l2tpSessionStatsState,
|
|
IPL2TP_SATTR_RO_l2tpSessionStatsCallType,
|
|
IPL2TP_SATTR_RO_l2tpSessionStatsCallSerialNumber,
|
|
IPL2TP_SATTR_RO_l2tpSessionStatsProxyLcp,
|
|
IPL2TP_SATTR_RO_l2tpSessionStatsSequencingState,
|
|
IPL2TP_SATTR_RO_l2tpSessionStatsOutSequence,
|
|
IPL2TP_SATTR_RO_l2tpSessionStatsReassemblyTimeouts,
|
|
IPL2TP_SATTR_RO_l2tpSessionStatsSendSeq,
|
|
IPL2TP_SATTR_RO_l2tpSessionStatsRecvSeq,
|
|
IPL2TP_SATTR_RO_REMOTE_CIRCUIT_STATUS,
|
|
|
|
/* End marker */
|
|
IPL2TP_SATTR_END_ENUM
|
|
}
|
|
Ipl2tp_session_tag;
|
|
|
|
|
|
/* R/W session Aliases */
|
|
#define IPL2TP_SATTR_SET_STATUS_CALLBACK \
|
|
IPL2TP_SATTR_RW_STATUS_CALLBACK
|
|
#define IPL2TP_SATTR_SET_DATA_CALLBACK \
|
|
IPL2TP_SATTR_RW_DATA_CALLBACK
|
|
#define IPL2TP_SATTR_SET_SLI_CALLBACK \
|
|
IPL2TP_SATTR_RW_SLI_CALLBACK
|
|
#define IPL2TP_SATTR_SET_USER_DATA \
|
|
IPL2TP_SATTR_RW_USER_DATA
|
|
#define IPL2TP_SATTR_SET_TX_CONNECT_SPEED \
|
|
IPL2TP_SATTR_RW_TX_CONNECT_SPEED
|
|
#define IPL2TP_SATTR_SET_RX_CONNECT_SPEED \
|
|
IPL2TP_SATTR_RW_RX_CONNECT_SPEED
|
|
#define IPL2TP_SATTR_SET_FRAMING_TYPE \
|
|
IPL2TP_SATTR_RW_FRAMING_TYPE
|
|
#define IPL2TP_SATTR_SET_BEARER_TYPE \
|
|
IPL2TP_SATTR_RW_BEARER_TYPE
|
|
#define IPL2TP_SATTR_SET_CALLED_NUMBER \
|
|
IPL2TP_SATTR_RW_CALLED_NUMBER
|
|
#define IPL2TP_SATTR_SET_CALLING_NUMBER \
|
|
IPL2TP_SATTR_RW_CALLING_NUMBER
|
|
#define IPL2TP_SATTR_SET_PHYS_CHAN_ID \
|
|
IPL2TP_SATTR_RW_PHYS_CHAN_ID
|
|
#define IPL2TP_SATTR_SET_SUB_ADDRESS \
|
|
IPL2TP_SATTR_RW_SUB_ADDRESS
|
|
#define IPL2TP_SATTR_SET_PRIVATE_GROUP_ID \
|
|
IPL2TP_SATTR_RW_PRIVATE_GROUP_ID
|
|
#define IPL2TP_SATTR_SET_AUTH_METHOD \
|
|
IPL2TP_SATTR_RW_AUTH_METHOD
|
|
#define IPL2TP_SATTR_SET_FIRST_RECEIVED_CONFREQ \
|
|
IPL2TP_SATTR_RW_FIRST_RECEIVED_CONFREQ
|
|
#define IPL2TP_SATTR_SET_LAST_RECEIVED_CONFREQ \
|
|
IPL2TP_SATTR_RW_LAST_RECEIVED_CONFREQ
|
|
#define IPL2TP_SATTR_SET_LAST_SENT_CONFREQ \
|
|
IPL2TP_SATTR_RW_LAST_SENT_CONFREQ
|
|
#define IPL2TP_SATTR_SET_PROXY_AUTHEN_NAME \
|
|
IPL2TP_SATTR_RW_PROXY_AUTHEN_NAME
|
|
#define IPL2TP_SATTR_SET_PROXY_AUTHEN_ID \
|
|
IPL2TP_SATTR_RW_PROXY_AUTHEN_ID
|
|
#define IPL2TP_SATTR_SET_PROXY_AUTHEN_CHALLENGE \
|
|
IPL2TP_SATTR_RW_PROXY_AUTHEN_CHALLENGE
|
|
#define IPL2TP_SATTR_SET_PROXY_AUTHEN_RESPONSE \
|
|
IPL2TP_SATTR_RW_PROXY_AUTHEN_RESPONSE
|
|
#define IPL2TP_SATTR_SET_l2tpSessionStatsIfIndex \
|
|
IPL2TP_SATTR_RW_l2tpSessionStatsIfIndex
|
|
#define IPL2TP_SATTR_SET_PSEUDOWIRE_TYPE \
|
|
IPL2TP_SATTR_RW_PSEUDOWIRE_TYPE
|
|
#define IPL2TP_SATTR_SET_REMOTE_END_ID \
|
|
IPL2TP_SATTR_RW_REMOTE_END_ID
|
|
#define IPL2TP_SATTR_SET_LOCAL_CIRCUIT_STATUS \
|
|
IPL2TP_SATTR_RW_LOCAL_CIRCUIT_STATUS
|
|
#define IPL2TP_SATTR_SET_DATA_SEQUENCING \
|
|
IPL2TP_SATTR_RW_DATA_SEQUENCING
|
|
#define IPL2TP_SATTR_SET_L2_SUBLAYER \
|
|
IPL2TP_SATTR_RW_L2_SUBLAYER
|
|
#define IPL2TP_SATTR_SET_TX_CONNECT_SPEED64 \
|
|
IPL2TP_SATTR_RW_TX_CONNECT_SPEED64
|
|
#define IPL2TP_SATTR_SET_RX_CONNECT_SPEED64 \
|
|
IPL2TP_SATTR_RW_RX_CONNECT_SPEED64
|
|
#define IPL2TP_SATTR_SET_MINIMUM_BPS \
|
|
IPL2TP_SATTR_RW_MINIMUM_BPS
|
|
#define IPL2TP_SATTR_SET_MAXIMUM_BPS \
|
|
IPL2TP_SATTR_RW_MAXIMUM_BPS
|
|
#define IPL2TP_SATTR_SET_L2_OUT_OF_ORDER_RESET \
|
|
IPL2TP_SATTR_RW_L2_OUT_OF_ORDER_RESET
|
|
|
|
|
|
#define IPL2TP_SATTR_GET_STATUS_CALLBACK \
|
|
IPL2TP_SATTR_RW_STATUS_CALLBACK
|
|
#define IPL2TP_SATTR_GET_DATA_CALLBACK \
|
|
IPL2TP_SATTR_RW_DATA_CALLBACK
|
|
#define IPL2TP_SATTR_GET_SLI_CALLBACK \
|
|
IPL2TP_SATTR_RW_SLI_CALLBACK
|
|
#define IPL2TP_SATTR_GET_USER_DATA \
|
|
IPL2TP_SATTR_RW_USER_DATA
|
|
#define IPL2TP_SATTR_GET_TX_CONNECT_SPEED \
|
|
IPL2TP_SATTR_RW_TX_CONNECT_SPEED
|
|
#define IPL2TP_SATTR_GET_RX_CONNECT_SPEED \
|
|
IPL2TP_SATTR_RW_RX_CONNECT_SPEED
|
|
#define IPL2TP_SATTR_GET_FRAMING_TYPE \
|
|
IPL2TP_SATTR_RW_FRAMING_TYPE
|
|
#define IPL2TP_SATTR_GET_BEARER_TYPE \
|
|
IPL2TP_SATTR_RW_BEARER_TYPE
|
|
#define IPL2TP_SATTR_GET_CALLED_NUMBER \
|
|
IPL2TP_SATTR_RW_CALLED_NUMBER
|
|
#define IPL2TP_SATTR_GET_CALLING_NUMBER \
|
|
IPL2TP_SATTR_RW_CALLING_NUMBER
|
|
#define IPL2TP_SATTR_GET_PHYS_CHAN_ID \
|
|
IPL2TP_SATTR_RW_PHYS_CHAN_ID
|
|
#define IPL2TP_SATTR_GET_SUB_ADDRESS \
|
|
IPL2TP_SATTR_RW_SUB_ADDRESS
|
|
#define IPL2TP_SATTR_GET_PRIVATE_GROUP_ID \
|
|
IPL2TP_SATTR_RW_PRIVATE_GROUP_ID
|
|
#define IPL2TP_SATTR_GET_AUTH_METHOD \
|
|
IPL2TP_SATTR_RW_AUTH_METHOD
|
|
#define IPL2TP_SATTR_GET_FIRST_RECEIVED_CONFREQ \
|
|
IPL2TP_SATTR_RW_FIRST_RECEIVED_CONFREQ
|
|
#define IPL2TP_SATTR_GET_LAST_RECEIVED_CONFREQ \
|
|
IPL2TP_SATTR_RW_LAST_RECEIVED_CONFREQ
|
|
#define IPL2TP_SATTR_GET_LAST_SENT_CONFREQ \
|
|
IPL2TP_SATTR_RW_LAST_SENT_CONFREQ
|
|
#define IPL2TP_SATTR_GET_PROXY_AUTHEN_NAME \
|
|
IPL2TP_SATTR_RW_PROXY_AUTHEN_NAME
|
|
#define IPL2TP_SATTR_GET_PROXY_AUTHEN_ID \
|
|
IPL2TP_SATTR_RW_PROXY_AUTHEN_ID
|
|
#define IPL2TP_SATTR_GET_PROXY_AUTHEN_CHALLENGE \
|
|
IPL2TP_SATTR_RW_PROXY_AUTHEN_CHALLENGE
|
|
#define IPL2TP_SATTR_GET_PROXY_AUTHEN_RESPONSE \
|
|
IPL2TP_SATTR_RW_PROXY_AUTHEN_RESPONSE
|
|
#define IPL2TP_SATTR_GET_l2tpSessionStatsIfIndex \
|
|
IPL2TP_SATTR_RW_l2tpSessionStatsIfIndex
|
|
#define IPL2TP_SATTR_GET_PSEUDOWIRE_TYPE \
|
|
IPL2TP_SATTR_RW_PSEUDOWIRE_TYPE
|
|
#define IPL2TP_SATTR_GET_REMOTE_END_ID \
|
|
IPL2TP_SATTR_RW_REMOTE_END_ID
|
|
#define IPL2TP_SATTR_GET_LOCAL_CIRCUIT_STATUS \
|
|
IPL2TP_SATTR_RW_LOCAL_CIRCUIT_STATUS
|
|
#define IPL2TP_SATTR_GET_DATA_SEQUENCING \
|
|
IPL2TP_SATTR_RW_DATA_SEQUENCING
|
|
#define IPL2TP_SATTR_GET_L2_SUBLAYER \
|
|
IPL2TP_SATTR_RW_L2_SUBLAYER
|
|
#define IPL2TP_SATTR_GET_TX_CONNECT_SPEED64 \
|
|
IPL2TP_SATTR_RW_TX_CONNECT_SPEED64
|
|
#define IPL2TP_SATTR_GET_RX_CONNECT_SPEED64 \
|
|
IPL2TP_SATTR_RW_RX_CONNECT_SPEED64
|
|
#define IPL2TP_SATTR_GET_MINIMUM_BPS \
|
|
IPL2TP_SATTR_RW_MINIMUM_BPS
|
|
#define IPL2TP_SATTR_GET_MAXIMUM_BPS \
|
|
IPL2TP_SATTR_RW_MAXIMUM_BPS
|
|
#define IPL2TP_SATTR_GET_L2_OUT_OF_ORDER_RESET \
|
|
IPL2TP_SATTR_RW_L2_OUT_OF_ORDER_RESET
|
|
|
|
|
|
|
|
|
|
/* R/O session Aliases */
|
|
#define IPL2TP_SATTR_GET_l2tpSessionStatsTunnelIfIndex \
|
|
IPL2TP_SATTR_RO_l2tpSessionStatsTunnelIfIndex
|
|
#define IPL2TP_SATTR_GET_l2tpSessionStatsLocalSID \
|
|
IPL2TP_SATTR_RO_l2tpSessionStatsLocalSID
|
|
#define IPL2TP_SATTR_GET_l2tpSessionStatsRemoteSID \
|
|
IPL2TP_SATTR_RO_l2tpSessionStatsRemoteSID
|
|
#define IPL2TP_SATTR_GET_l2tpSessionStatsUserName \
|
|
IPL2TP_SATTR_RO_l2tpSessionStatsUserName
|
|
#define IPL2TP_SATTR_GET_l2tpSessionStatsState \
|
|
IPL2TP_SATTR_RO_l2tpSessionStatsState
|
|
#define IPL2TP_SATTR_GET_l2tpSessionStatsCallType \
|
|
IPL2TP_SATTR_RO_l2tpSessionStatsCallType
|
|
#define IPL2TP_SATTR_GET_l2tpSessionStatsCallSerialNumber \
|
|
IPL2TP_SATTR_RO_l2tpSessionStatsCallSerialNumber
|
|
#define IPL2TP_SATTR_GET_l2tpSessionStatsProxyLcp \
|
|
IPL2TP_SATTR_RO_l2tpSessionStatsProxyLcp
|
|
#define IPL2TP_SATTR_GET_l2tpSessionStatsSequencingState \
|
|
IPL2TP_SATTR_RO_l2tpSessionStatsSequencingState
|
|
#define IPL2TP_SATTR_GET_l2tpSessionStatsOutSequence \
|
|
IPL2TP_SATTR_RO_l2tpSessionStatsOutSequence
|
|
#define IPL2TP_SATTR_GET_l2tpSessionStatsReassemblyTimeouts \
|
|
IPL2TP_SATTR_RO_l2tpSessionStatsReassemblyTimeouts
|
|
#define IPL2TP_SATTR_GET_l2tpSessionStatsSendSeq \
|
|
IPL2TP_SATTR_RO_l2tpSessionStatsSendSeq
|
|
#define IPL2TP_SATTR_GET_l2tpSessionStatsRecvSeq \
|
|
IPL2TP_SATTR_RO_l2tpSessionStatsRecvSeq
|
|
#define IPL2TP_SATTR_GET_REMOTE_CIRCUIT_STATUS \
|
|
IPL2TP_SATTR_RO_REMOTE_CIRCUIT_STATUS
|
|
|
|
#define IPL2TP_SATTR_GET_l2tpSessionStatsTxConnectSpeed \
|
|
IPL2TP_SATTR_RW_TX_CONNECT_SPEED
|
|
#define IPL2TP_SATTR_GET_l2tpSessionStatsRxConnectSpeed \
|
|
IPL2TP_SATTR_RW_RX_CONNECT_SPEED
|
|
#define IPL2TP_SATTR_GET_l2tpSessionStatsFramingType \
|
|
IPL2TP_SATTR_RW_FRAMING_TYPE
|
|
#define IPL2TP_SATTR_GET_l2tpSessionStatsCallBearerType \
|
|
IPL2TP_SATTR_RW_BEARER_TYPE
|
|
#define IPL2TP_SATTR_GET_l2tpSessionStatsDNIS \
|
|
IPL2TP_SATTR_RW_CALLED_NUMBER
|
|
#define IPL2TP_SATTR_GET_l2tpSessionStatsCLID \
|
|
IPL2TP_SATTR_RW_CALLING_NUMBER
|
|
#define IPL2TP_SATTR_GET_l2tpSessionStatsPhysChanId \
|
|
IPL2TP_SATTR_RW_PHYS_CHAN_ID
|
|
#define IPL2TP_SATTR_GET_l2tpSessionStatsSubAddress \
|
|
IPL2TP_SATTR_RW_SUB_ADDRESS
|
|
#define IPL2TP_SATTR_GET_l2tpSessionStatsPrivateGroupID \
|
|
IPL2TP_SATTR_RW_PRIVATE_GROUP_ID
|
|
#define IPL2TP_SATTR_GET_l2tpSessionStatsAuthMethod \
|
|
IPL2TP_SATTR_RW_AUTH_METHOD
|
|
|
|
|
|
/* Attribute object types */
|
|
typedef struct Ipl2tp_attrobj
|
|
{
|
|
char opaque;
|
|
}
|
|
*Ipl2tp_attrobj;
|
|
|
|
typedef struct Ipl2tp_attr
|
|
{
|
|
char opaque;
|
|
}
|
|
*Ipl2tp_attr;
|
|
|
|
/* */
|
|
typedef struct Ipl2tp_attr_info
|
|
{
|
|
Ip_u32 value; /* The attribute value */
|
|
const char *name; /* Attribute name */
|
|
const char **hr; /* Human readable meaning of the value */
|
|
Ip_u16 type; /* Type; one of the ATTR_TYPE definitions */
|
|
Ip_u16 rw; /* Read/Write */
|
|
}
|
|
Ipl2tp_attr_info;
|
|
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 6 FUNCTIONS
|
|
****************************************************************************
|
|
*/
|
|
extern Ipl2tp_attr_info ipl2tp_tags[];
|
|
extern Ipl2tp_attr_info ipl2tp_tunnel_tags[];
|
|
extern Ipl2tp_attr_info ipl2tp_session_tags[];
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipl2tp_attr_new - Create a new attribute object.
|
|
*
|
|
* Create and initialize a new attribute object. The attribute object is
|
|
* allocated from the heap and must be returned with a call to
|
|
* ipl2tp_attr_delete().
|
|
*
|
|
* SYNOPSIS
|
|
* \cs
|
|
* Ipl2tp_attrobj ipl2tp_attr_new(void);
|
|
* \ce
|
|
*
|
|
* PARAMETERS
|
|
* \is
|
|
* \i None
|
|
* \ie
|
|
*
|
|
* RETURNS
|
|
* \is
|
|
* \i An attribute object if successful.
|
|
* \i 'IP_NULL' if out of memory.
|
|
* \ie
|
|
*
|
|
*
|
|
* EXAMPLE
|
|
* \cs
|
|
* void example(void)
|
|
* {
|
|
* Ipl2tp_attrobj attrobj;
|
|
*
|
|
* if ((attrobj = ipl2tp_attr_new()) == IP_NULL)
|
|
* {
|
|
* printf("Out of memory\n");
|
|
* }
|
|
* }
|
|
* \ce
|
|
*
|
|
*
|
|
* SEE ALSO
|
|
*
|
|
* IPL2TP_ATTR_OBJECT(), ipl2tp_attr_delete(), ipl2tp_attr_clear()
|
|
*
|
|
* ERRNO
|
|
* None
|
|
*/
|
|
IP_EXTERN Ipl2tp_attrobj ipl2tp_attr_new(void);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipl2tp_attr_delete - Delete an attribute object.
|
|
*
|
|
* Delete an attribute object that has been created with ipl2tp_attr_new(). It also
|
|
* sets the 'attrobj' pointer to IP_NULL.
|
|
*
|
|
* SYNOPSIS
|
|
* \cs
|
|
* Ipl2tp_status ipl2tp_attr_delete(Ipl2tp_attrobj *attrobj);
|
|
* \ce
|
|
*
|
|
* PARAMETERS
|
|
* \is
|
|
* \i 'attrobj' Attribute object.
|
|
* \ie
|
|
*
|
|
* RETURNS
|
|
* \is
|
|
* \i 'IPL2TP_STATUS_OK' if success.
|
|
* \i 'IPL2TP_STATUS_BADPARAM' if a bad attribute object is present.
|
|
* \ie
|
|
*
|
|
*
|
|
* EXAMPLE
|
|
* \cs
|
|
* void example(void)
|
|
* {
|
|
* Ipl2tp_attrobj attrobj = ipl2tp_attr_new();
|
|
*
|
|
* if (attrobj != IP_NULL)
|
|
* {
|
|
* ipl2tp_attr_delete(&attrobj);
|
|
* }
|
|
* }
|
|
* \ce
|
|
*
|
|
*
|
|
* SEE ALSO
|
|
*
|
|
* ipl2tp_attr_new(), ipl2tp_attr_clear()
|
|
*
|
|
* ERRNO
|
|
* None
|
|
*/
|
|
IP_EXTERN Ipl2tp_status ipl2tp_attr_delete(Ipl2tp_attrobj *attrobj);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipl2tp_attr_iappend - Append an integer attribute to an attribute object.
|
|
*
|
|
* Append an integer attribute to an attribute object. If the dereferenced value of
|
|
* 'attrobjp' is IP_NULL, the 'attrobj' is dynamically allocated.
|
|
*
|
|
* SYNOPSIS
|
|
* \cs
|
|
* Ipl2tp_status ipl2tp_attr_iappend(Ipl2tp_attrobj *attrobjp, Ip_u16 tag, Ip_u32 data);
|
|
* \ce
|
|
*
|
|
* PARAMETERS
|
|
* \is
|
|
* \i 'attrobjp' Pointer to the attribute object.
|
|
* \i 'tag' Data tag.
|
|
* \i 'data' Data value.
|
|
* \ie
|
|
*
|
|
* RETURNS
|
|
* \is
|
|
* \i 'IPL2TP_STATUS_OK' if success.
|
|
* \i 'IPL2TP_STATUS_BADPARAM' if a bad attribute object is present.
|
|
* \i 'IPL2TP_STATUS_NOMEM' if attribute object is full or out of memory.
|
|
* \ie
|
|
*
|
|
*
|
|
* EXAMPLE
|
|
* \cs
|
|
* void example(void)
|
|
* {
|
|
* Ipl2tp_attrobj attrobj;
|
|
*
|
|
* /@ Initialize @/
|
|
* ipl2tp_api_init();
|
|
*
|
|
* if ((attrobj = ipl2tp_attr_new()) != IP_NULL)
|
|
* {
|
|
* /@ Create attribute object @/
|
|
* ipl2tp_attr_iappend(&attrobj, IPL2TP_RUNTIME_LOGLEVEL, 7);
|
|
*
|
|
* /@ Open IPL2TP and release attribute object @/
|
|
* ipl2tp_api_open(attrobj, IP_NULL, IP_NULL, IP_NULL, IP_NULL);
|
|
* ipl2tp_attr_delete(&attrobj);
|
|
* }
|
|
* }
|
|
* \ce
|
|
*
|
|
*
|
|
* SEE ALSO
|
|
*
|
|
* ipl2tp_attr_pappend(), ipl2tp_attr_vappend()
|
|
*
|
|
* ERRNO
|
|
* None
|
|
*/
|
|
IP_EXTERN Ipl2tp_status ipl2tp_attr_iappend(Ipl2tp_attrobj *attrobjp,
|
|
int tag,
|
|
Ip_u32 data);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipl2tp_attr_iappend64 - Append a string to an attribute object.
|
|
*
|
|
* Append a string to the attribute object. If the dereferenced value of 'attrobjp' is
|
|
* IP_NULL, the 'attrobj' is dynamically allocated.
|
|
*
|
|
* SYNOPSIS
|
|
* \cs
|
|
* Ipl2tp_status ipl2tp_attr_iappend64(Ipl2tp_attrobj *attrobjp, Ip_u16 tag, Ip_u64 *data);
|
|
* \ce
|
|
*
|
|
* PARAMETERS
|
|
* \is
|
|
* \i 'attrobjp' Pointer to attribute object.
|
|
* \i 'tag' Data tag.
|
|
* \i 'data' 64 bit data.
|
|
* \ie
|
|
*
|
|
* RETURNS
|
|
* \is
|
|
* \i 'IPL2TP_STATUS_OK' if success.
|
|
* \i 'IPL2TP_STATUS_BADPARAM' if a bad attribute object is present.
|
|
* \i 'IPL2TP_STATUS_NOMEM' if attribute object is full or out of memory.
|
|
* \ie
|
|
*
|
|
*
|
|
* EXAMPLE
|
|
* \cs
|
|
* void example(void)
|
|
* {
|
|
* Ipl2tp_attrobj attrobj;
|
|
*
|
|
* /@ Initialize @/
|
|
* ipl2tp_init();
|
|
*
|
|
* if ((attrobj = ipl2tp_attr_new()) != IP_NULL)
|
|
* {
|
|
* Ip_u64 speed;
|
|
* IP_U64_SET(speed, 0, 38400);
|
|
*
|
|
* /@ Create attribute object @/
|
|
* ipl2tp_attr_iappend64(&attrobj,
|
|
* IPL2TP_SATTR_RW_TX_CONNECT_SPEED, &speed);
|
|
*
|
|
* /@ Open IPL2TP and release attribute object @/
|
|
* ipl2tp_api_open(attrobj, IP_NULL, IP_NULL, IP_NULL, IP_NULL);
|
|
* ipl2tp_attr_delete(&attrobj);
|
|
* }
|
|
* }
|
|
* \ce
|
|
*
|
|
*
|
|
* SEE ALSO
|
|
*
|
|
* ipl2tp_attr_iappend(), ipl2tp_attr_vappend(), ipl2tp_attr_strappend(),
|
|
* ipl2tp_attr_keyappend(), ipl2tp_attr_pappend(), ipl2tp_attr_addrappend()
|
|
*
|
|
* ERRNO
|
|
* None
|
|
*/
|
|
IP_EXTERN Ipl2tp_status ipl2tp_attr_iappend64(Ipl2tp_attrobj *attrobjp,
|
|
int tag,
|
|
Ip_u64 *data);
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipl2tp_attr_pappend - Append a pointer attribute to an attribute object.
|
|
*
|
|
* Append a pointer attribute to an attribute object. If the dereferenced value of
|
|
* 'attrobjp' is IP_NULL, the 'attrobj' is dynamically allocated.
|
|
*
|
|
* SYNOPSIS
|
|
* \cs
|
|
* Ipl2tp_status ipl2tp_attr_pappend(Ipl2tp_attrobj *attrobjp, Ip_u16 tag, void *data);
|
|
* \ce
|
|
*
|
|
* PARAMETERS
|
|
* \is
|
|
* \i 'attrobjp' Pointer to attribute object.
|
|
* \i 'tag' Data tag.
|
|
* \i 'data' Data value.
|
|
* \ie
|
|
*
|
|
* RETURNS
|
|
* \is
|
|
* \i 'IPL2TP_STATUS_OK' if success.
|
|
* \i 'IPL2TP_STATUS_BADPARAM' if a bad attribute object is present.
|
|
* \i 'IPL2TP_STATUS_NOMEM' if attribute object is full or out of memory.
|
|
* \ie
|
|
*
|
|
*
|
|
* EXAMPLE
|
|
* \cs
|
|
* void example(void)
|
|
* {
|
|
* Ipl2tp_attrobj attrobj;
|
|
*
|
|
* /@ Initialize @/
|
|
* ipl2tp_init();
|
|
*
|
|
* if ((attrobj = ipl2tp_attr_new()) != IP_NULL)
|
|
* {
|
|
* /@ Create attribute object @/
|
|
* ipl2tp_attr_pappend(&attrobj, IPL2TP_SATTR_RW_USER_DATA, "myname");
|
|
*
|
|
* /@ Open IPL2TP and release attribute object @/
|
|
* ipl2tp_api_open(attrobj, IP_NULL, IP_NULL, IP_NULL, IP_NULL);
|
|
* ipl2tp_attr_delete(&attrobj);
|
|
* }
|
|
* }
|
|
* \ce
|
|
*
|
|
*
|
|
* SEE ALSO
|
|
*
|
|
* ipl2tp_attr_iappend(), ipl2tp_attr_vappend(), ipl2tp_attr_iappend64(),
|
|
* ipl2tp_attr_keyappend(), ipl2tp_attr_strappend(), ipl2tp_attr_addrappend()
|
|
*
|
|
* ERRNO
|
|
* None
|
|
*/
|
|
IP_EXTERN Ipl2tp_status ipl2tp_attr_pappend(Ipl2tp_attrobj *attrobjp,
|
|
int tag,
|
|
void *data);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipl2tp_attr_vappend - Append a vector attribute to an attribute object.
|
|
*
|
|
* Append a vector attribute to an attribute object. If the dereferenced value of
|
|
* 'attrobjp' is IP_NULL, the 'attrobj' is dynamically allocated.
|
|
*
|
|
* SYNOPSIS
|
|
* \cs
|
|
* Ipl2tp_status ipl2tp_attr_vappend(Ipl2tp_attrobj *attrobjp, Ip_u16 tag, void *data, Ip_u16 length);
|
|
* \ce
|
|
*
|
|
* PARAMETERS
|
|
* \is
|
|
* \i 'attrobjp' Pointer to attribute object.
|
|
* \i 'tag' Data tag.
|
|
* \i 'data' Data value.
|
|
* \i 'length' Data length.
|
|
* \ie
|
|
*
|
|
* RETURNS
|
|
* \is
|
|
* \i 'IPL2TP_STATUS_OK' if success.
|
|
* \i 'IPL2TP_STATUS_BADPARAM' if a bad attribute object is present.
|
|
* \i 'IPL2TP_STATUS_NOMEM' if attribute object is full or out of memory.
|
|
* \ie
|
|
*
|
|
*
|
|
* EXAMPLE
|
|
* \cs
|
|
* void example(void)
|
|
* {
|
|
* struct Ip_in_addr ipaddr;
|
|
* Ipl2tp_attrobj sattr = ipl2tp_attr_new();
|
|
* Ipl2tp_key skey;
|
|
* struct Ip_sockaddr_in saddr;
|
|
*
|
|
* /@ Setup AF_INET peer @/
|
|
* saddr.sin_family = IP_AF_INET;
|
|
* saddr.sin_len = sizeof(saddr);
|
|
* saddr.sin_addr.s_addr = inet_addr("192.168.0.2");
|
|
*
|
|
* /@ Create version 2 session @/
|
|
* skey.ident = 0;
|
|
* skey.version = IPL2TP_VERSION_L2TPV2;
|
|
*
|
|
* /@ Set CONFREQ attribute @/
|
|
* ipl2tp_attr_vappend(&sattr,
|
|
* IPL2TP_SATTR_RW_FIRST_RECEIVED_CONFREQ,
|
|
* first_rec_confreq.data, first_rec_confreq.length);
|
|
*
|
|
* /@ Open incoming session @/
|
|
* if (ipl2tp_api_session_open(&skey, 0, &saddr,
|
|
* IP_NULL, sattr, IP_TRUE) != IPL2TP_STATUS_OK)
|
|
* {
|
|
* printf("Failed at session_open()\n");
|
|
* }
|
|
*
|
|
* /@ Delete attribute object @/
|
|
* ipl2tp_attr_delete(&sattr);
|
|
* }
|
|
* \ce
|
|
*
|
|
*
|
|
* SEE ALSO
|
|
*
|
|
* ipl2tp_attr_iappend(), ipl2tp_attr_pappend(), ipl2tp_attr_iappend64(),
|
|
* ipl2tp_attr_strappend(), ipl2tp_attr_keyappend(), ipl2tp_attr_addrappend()
|
|
*
|
|
* ERRNO
|
|
* None
|
|
*/
|
|
IP_EXTERN Ipl2tp_status ipl2tp_attr_vappend(Ipl2tp_attrobj *attrobjp,
|
|
int tag,
|
|
void *data,
|
|
int length);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipl2tp_attr_strappend - Append a string to an attribute object.
|
|
*
|
|
* Append a string to the attribute object. If the dereferenced value of 'attrobjp' is
|
|
* IP_NULL, the 'attrobj' is dynamically allocated.
|
|
*
|
|
* SYNOPSIS
|
|
* \cs
|
|
* Ipl2tp_status ipl2tp_attr_strappend(Ipl2tp_attrobj *attrobjp, Ip_u16 tag, const char *str);
|
|
* \ce
|
|
*
|
|
* PARAMETERS
|
|
* \is
|
|
* \i 'attrobjp' Pointer to attribute object.
|
|
* \i 'tag' Data tag.
|
|
* \i 'str' String.
|
|
* \ie
|
|
*
|
|
* RETURNS
|
|
* \is
|
|
* \i 'IPL2TP_STATUS_OK' if success.
|
|
* \i 'IPL2TP_STATUS_BADPARAM' if a bad attribute object is present.
|
|
* \i 'IPL2TP_STATUS_NOMEM' if attribute object is full or out of memory.
|
|
* \ie
|
|
*
|
|
*
|
|
* EXAMPLE
|
|
* \cs
|
|
* void example(void)
|
|
* {
|
|
* Ipl2tp_attrobj attrobj;
|
|
*
|
|
* /@ Initialize @/
|
|
* ipl2tp_init();
|
|
*
|
|
* if ((attrobj = ipl2tp_attr_new()) != IP_NULL)
|
|
* {
|
|
* /@ Create attribute object @/
|
|
* ipl2tp_attr_strappend(&attrobj, IPL2TP_ATTR_RW_HOST_NAME, "myname");
|
|
*
|
|
* /@ Open IPL2TP and release attribute object @/
|
|
* ipl2tp_api_open(attrobj, IP_NULL, IP_NULL, IP_NULL, IP_NULL);
|
|
* ipl2tp_attr_delete(&attrobj);
|
|
* }
|
|
* }
|
|
* \ce
|
|
*
|
|
*
|
|
* SEE ALSO
|
|
*
|
|
* ipl2tp_attr_iappend(), ipl2tp_attr_vappend(), ipl2tp_attr_iappend64(),
|
|
* ipl2tp_attr_keyappend(), ipl2tp_attr_pappend(), ipl2tp_attr_addrdata()
|
|
*
|
|
* ERRNO
|
|
* None
|
|
*/
|
|
IP_EXTERN Ipl2tp_status ipl2tp_attr_strappend(Ipl2tp_attrobj *attrobjp,
|
|
int tag,
|
|
const char *str);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipl2tp_attr_keyappend - Append a session/tunnel key as attribute data.
|
|
*
|
|
* Append a session/tunnel key as attribute data. If the dereferenced value of 'attrobjp'
|
|
* is IP_NULL, the 'attrobj' is dynamically allocated.
|
|
*
|
|
* SYNOPSIS
|
|
* \cs
|
|
* Ipl2tp_status ipl2tp_attr_keyappend(Ipl2tp_attrobj *attrobjp, Ip_u16 tag, Ipl2tp_key *key);
|
|
* \ce
|
|
*
|
|
* PARAMETERS
|
|
* \is
|
|
* \i 'attrobjp' Pointer to attribute object.
|
|
* \i 'tag' Data tag.
|
|
* \i 'key' keyt data.
|
|
* \ie
|
|
*
|
|
* RETURNS
|
|
* \is
|
|
* \i 'IPL2TP_STATUS_OK' if success.
|
|
* \i 'IPL2TP_STATUS_BADPARAM' if a bad attribute object is present.
|
|
* \i 'IPL2TP_STATUS_NOMEM' if attribute object is full or out of memory.
|
|
* \ie
|
|
*
|
|
*
|
|
* EXAMPLE
|
|
*
|
|
* There are currently no attributes which require you
|
|
* to append key data.
|
|
*
|
|
*
|
|
* SEE ALSO
|
|
*
|
|
* ipl2tp_attr_iappend(), ipl2tp_attr_vappend(), ipl2tp_attr_iappend64(),
|
|
* ipl2tp_attr_strappend(), ipl2tp_attr_pappend(), ipl2tp_attr_addrappend()
|
|
*
|
|
* ERRNO
|
|
* None
|
|
*/
|
|
IP_EXTERN Ipl2tp_status ipl2tp_attr_keyappend(Ipl2tp_attrobj *attrobjp,
|
|
int tag,
|
|
Ipl2tp_key *key);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipl2tp_attr_addrappend - Append a socket address as attribute data.
|
|
*
|
|
* Append a socket address as attribute data. If the dereferenced value of 'attrobjp' is
|
|
* IP_NULL, the 'attrobj' is dynamically allocated.
|
|
*
|
|
*
|
|
* SYNOPSIS
|
|
* \cs
|
|
* Ipl2tp_status ipl2tp_attr_addrappend(Ipl2tp_attrobj *attrobjp, Ip_u16 tag, union Ip_sockaddr_union *addr);
|
|
* \ce
|
|
*
|
|
* PARAMETERS
|
|
* \is
|
|
* \i 'attrobjp' Pointer to attribute object.
|
|
* \i 'tag' Data tag.
|
|
* \i 'addr' socket address data.
|
|
* \ie
|
|
*
|
|
* RETURNS
|
|
* \is
|
|
* \i 'IPL2TP_STATUS_OK' if success.
|
|
* \i 'IPL2TP_STATUS_BADPARAM' if a bad attribute object is present.
|
|
* \i 'IPL2TP_STATUS_NOMEM' if attribute object is full or out of memory.
|
|
* \ie
|
|
*
|
|
*
|
|
* EXAMPLE
|
|
*
|
|
* There are currently no attributes which requires you
|
|
* to append address data.
|
|
*
|
|
*
|
|
* SEE ALSO
|
|
*
|
|
* ipl2tp_attr_iappend(), ipl2tp_attr_vappend(), ipl2tp_attr_iappend64(),
|
|
* ipl2tp_attr_strappend(), ipl2tp_attr_pappend(), ipl2tp_attr_keyappend()
|
|
*
|
|
* ERRNO
|
|
* None
|
|
*/
|
|
IP_EXTERN Ipl2tp_status ipl2tp_attr_addrappend(Ipl2tp_attrobj *attrobjp,
|
|
int tag,
|
|
union Ip_sockaddr_union *addr);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipl2tp_attr_add_query - Append a query to an attribute object.
|
|
*
|
|
* Append a query to an attribute object to retrieve information regarding the
|
|
* attribute. This function is usually used prior to retrieving attribute
|
|
* information using one of the various attribute_get functions. If the
|
|
* dereferenced value of 'attrobjp' is IP_NULL, the 'attrobj' is dynamically
|
|
* allocated.
|
|
*
|
|
* SYNOPSIS
|
|
* \cs
|
|
* Ipl2tp_status ipl2tp_attr_iappend(Ipl2tp_attrobj *attrobjp, Ip_u16 tag);
|
|
* \ce
|
|
*
|
|
* PARAMETERS
|
|
* \is
|
|
* \i 'attrobjp' Pointer to attribute object.
|
|
* \i 'tag' Data tag.
|
|
* \ie
|
|
*
|
|
* RETURNS
|
|
* \is
|
|
* \i 'IPL2TP_STATUS_OK' if success.
|
|
* \i 'IPL2TP_STATUS_BADPARAM' if a bad attribute object is present.
|
|
* \i 'IPL2TP_STATUS_NOMEM' if attribute object is full or out of memory.
|
|
* \ie
|
|
*
|
|
*
|
|
* EXAMPLE
|
|
* \cs
|
|
* void example(void)
|
|
* {
|
|
* Ipl2tp_attrobj attrobj = IP_NULL;
|
|
* Ipl2tp_attrobj replies = IP_NULL;
|
|
*
|
|
* ipl2tp_api_add_query(&attrobj, IPL2TP_SATTR_RW_TX_CONNECT_SPEED);
|
|
*
|
|
* ipl2tp_api_session_attribute_get(sidp, attrobj, &replies);
|
|
*
|
|
* /@ Retrieve the TX connect speed value, and print @/
|
|
*
|
|
* /@ Delete the attribute objects @/
|
|
* ipl2tp_api_attr_delete(&attrobj);
|
|
* ipl2tp_api_attr_delete(&replies);
|
|
* }
|
|
* \ce
|
|
*
|
|
*
|
|
* SEE ALSO
|
|
*
|
|
* ipl2tp_attr_pappend(), ipl2tp_attr_vappend()
|
|
*
|
|
* ERRNO
|
|
* None
|
|
*/
|
|
IP_EXTERN Ipl2tp_status ipl2tp_attr_add_query(Ipl2tp_attrobj *attrobjp,
|
|
int tag);
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipl2tp_attr_tag - Obtain the tag of an attribute.
|
|
*
|
|
* Obtain the tag of an attribute.
|
|
*
|
|
* SYNOPSIS
|
|
* \cs
|
|
* int ipl2tp_attr_tag(Ipl2tp_attr attr);
|
|
* \ce
|
|
*
|
|
* PARAMETERS
|
|
* \is
|
|
* \i 'attr' Attribute.
|
|
* \ie
|
|
*
|
|
* RETURNS
|
|
* \is
|
|
* \i Attribute tag.
|
|
* \ie
|
|
*
|
|
*
|
|
* EXAMPLE
|
|
* \cs
|
|
* void example(Ipl2tp_attrobj attrobj)
|
|
* {
|
|
* Ipl2tp_attr a;
|
|
*
|
|
* /@ Loop for all attributes @/
|
|
*
|
|
* for (a = ipl2tp_attr_first(attrobj); a != IP_NULL; a = ipl2tp_attr_next(a))
|
|
* {
|
|
* Ip_u16 tag;
|
|
*
|
|
* /@ Check tag @/
|
|
* switch(tag = ipl2tp_attr_tag(a))
|
|
* {
|
|
* case IPL2TP_ATTR_RW_HOST_NAME:
|
|
* printf("Host name: %s\n",ipl2tp_attr_strdata(a));
|
|
* break;
|
|
*
|
|
* default:
|
|
* printf("Invalid attribute: %d", (int)tag);
|
|
* break;
|
|
* }
|
|
* }
|
|
* }
|
|
* \ce
|
|
*
|
|
*
|
|
* SEE ALSO
|
|
*
|
|
* ipl2tp_attr_length(), ipl2tp_attr_status(), ipl2tp_attr_idata(), ipl2tp_attr_pdata()
|
|
*
|
|
* ERRNO
|
|
* None
|
|
*/
|
|
IP_EXTERN int ipl2tp_attr_tag(Ipl2tp_attr attr);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipl2tp_attr_length - Obtain the length of an attribute.
|
|
*
|
|
* Obtain the length of an attribute.
|
|
*
|
|
* SYNOPSIS
|
|
* \cs
|
|
* int ipl2tp_attr_length(Ipl2tp_attr attr);
|
|
* \ce
|
|
*
|
|
* PARAMETERS
|
|
* \is
|
|
* \i 'attr' Attribute.
|
|
* \ie
|
|
*
|
|
* RETURNS
|
|
* \is
|
|
* \i Attribute length.
|
|
* \ie
|
|
*
|
|
*
|
|
* EXAMPLE
|
|
* \cs
|
|
* void example(Ipl2tp_attrobj attrobj)
|
|
* {
|
|
* Ipl2tp_attr a;
|
|
*
|
|
* /@ Loop for all attributes @/
|
|
* for (a = ipl2tp_attr_first(attrobj);
|
|
* a != IP_NULL;
|
|
* a = ipl2tp_attr_next(a))
|
|
* {
|
|
* Ip_u16 tag;
|
|
*
|
|
* /@ Check tag @/
|
|
* switch(tag = ipl2tp_attr_tag(a))
|
|
* {
|
|
* case IPL2TP_SATTR_RW_FIRST_RECEIVED_CONFREQ:
|
|
* printf("First received CONFREQ was %d octets\n", ipl2tp_attr_length(a));
|
|
* break;
|
|
*
|
|
* default:
|
|
* printf("Invalid attribute: %d", (int)tag);
|
|
* break;
|
|
* }
|
|
* }
|
|
* }
|
|
* \ce
|
|
*
|
|
*
|
|
* SEE ALSO
|
|
*
|
|
* ipl2tp_attr_status(), ipl2tp_attr_tag(), ipl2tp_attr_idata(), ipl2tp_attr_pdata()
|
|
*
|
|
* ERRNO
|
|
* None
|
|
*/
|
|
IP_EXTERN int ipl2tp_attr_length(Ipl2tp_attr attr);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipl2tp_attr_status - Obtain the status of an attribute.
|
|
*
|
|
* Obtain the status of an attribute.
|
|
*
|
|
* SYNOPSIS
|
|
* \cs
|
|
* int ipl2tp_attr_status(Ipl2tp_attr attr);
|
|
* \ce
|
|
*
|
|
* PARAMETERS
|
|
* \is
|
|
* \i 'attr' Attribute.
|
|
* \ie
|
|
*
|
|
* RETURNS
|
|
* \is
|
|
* \i Attribute status.
|
|
* \ie
|
|
*
|
|
*
|
|
* EXAMPLE
|
|
* \cs
|
|
* void example(Ipl2tp_attrobj attrobj)
|
|
* {
|
|
* Ipl2tp_attr a;
|
|
*
|
|
* /@ Loop for all attributes @/
|
|
* for (a = ipl2tp_attr_first(attrobj); a != IP_NULL; a = ipl2tp_attr_next(a))
|
|
* {
|
|
* /@ Check status @/
|
|
* if (ipl2tp_attr_status(a) != IPL2TP_STATUS_OK)
|
|
* {
|
|
* printf("Error setting attribute %d\n",
|
|
* ipl2tp_attr_tag(a));
|
|
* }
|
|
* }
|
|
* }
|
|
* \ce
|
|
*
|
|
*
|
|
* SEE ALSO
|
|
*
|
|
* ipl2tp_attr_tag(), ipl2tp_attr_length()
|
|
*
|
|
* ERRNO
|
|
* None
|
|
*/
|
|
IP_EXTERN int ipl2tp_attr_status(Ipl2tp_attr attr);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipl2tp_attr_keydata - Retrieve key data from the attribute.
|
|
*
|
|
* Retrieves the key data from the attribute.
|
|
*
|
|
* SYNOPSIS
|
|
* \cs
|
|
* Ipl2tp_key *ipl2tp_attr_keydataIpl2tp_attr attr);
|
|
* \ce
|
|
*
|
|
* PARAMETERS
|
|
* \is
|
|
* \i 'attr' Attribute.
|
|
* \ie
|
|
*
|
|
* RETURNS
|
|
* \is
|
|
* \i Attribute as key data
|
|
* \ie
|
|
*
|
|
*
|
|
* EXAMPLE
|
|
* \cs
|
|
* void example(Ipl2tp_attrobj attrobj)
|
|
* {
|
|
* Ipl2tp_attr a;
|
|
*
|
|
* /@ Loop for all attributes @/
|
|
* for (a = ipl2tp_attr_first(attrobj);
|
|
* a != IP_NULL;
|
|
* a = ipl2tp_attr_next(a))
|
|
* {
|
|
* Ip_u16 tag;
|
|
*
|
|
* /@ Check tag @/
|
|
* switch(tag = ipl2tp_attr_tag(a))
|
|
* {
|
|
* case IPL2TP_TATTR_RO_l2tpTunnelStatsLocalTID:
|
|
* printf("Local TID: %d:\n",
|
|
* ipl2tp_attr_keydata(a)->ident);
|
|
* break;
|
|
*
|
|
* default:
|
|
* printf("Invalid attribute: %d", (int)tag);
|
|
* break;
|
|
* }
|
|
* }
|
|
* }
|
|
* \ce
|
|
*
|
|
*
|
|
* SEE ALSO
|
|
*
|
|
* ipl2tp_attr_tag(), ipl2tp_attr_length(), ipl2tp_attr_idata(),ipl2tp_attr_pdata(),
|
|
* ipl2tp_attr_idata64(), ipl2tp_attr_vdata(), ipl2tp_attr_addrdata(),
|
|
* ipl2tp_attr_strdata()
|
|
*
|
|
* ERRNO
|
|
* None
|
|
*/
|
|
IP_EXTERN Ipl2tp_key *ipl2tp_attr_keydata(Ipl2tp_attr attr);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipl2tp_attr_idata - Obtain the integer value of an attribute.
|
|
*
|
|
* Obtain the integer value of an attribute.
|
|
*
|
|
* SYNOPSIS
|
|
* \cs
|
|
* Ip_u32 ipl2tp_attr_idata(Ipl2tp_attr attr);
|
|
* \ce
|
|
*
|
|
* PARAMETERS
|
|
* \is
|
|
* \i 'attr' Attribute.
|
|
* \ie
|
|
*
|
|
* RETURNS
|
|
* \is
|
|
* \i Attribute value as an integer.
|
|
* \ie
|
|
*
|
|
*
|
|
* EXAMPLE
|
|
* \cs
|
|
* void example(Ipl2tp_attrobj attrobj)
|
|
* {
|
|
* Ipl2tp_attr a;
|
|
*
|
|
* /@ Loop for all attributes @/
|
|
* for (a = ipl2tp_attr_first(attrobj);
|
|
* a != IP_NULL;
|
|
* a = ipl2tp_attr_next(a))
|
|
* {
|
|
* Ip_u16 tag;
|
|
*
|
|
* /@ Check tag @/
|
|
* switch(tag = ipl2tp_attr_tag(a))
|
|
* {
|
|
* case IPL2TP_SATTR_RW_TX_CONNECT_SPEED:
|
|
* printf("Connect speed: %d\n", (int)ipl2tp_attr_idata(a));
|
|
* break;
|
|
*
|
|
* default:
|
|
* printf("Invalid attribute: %d", (int)tag);
|
|
* break;
|
|
* }
|
|
* }
|
|
* }
|
|
* \ce
|
|
*
|
|
*
|
|
* SEE ALSO
|
|
*
|
|
* ipl2tp_attr_tag(), ipl2tp_attr_length(), ipl2tp_attr_pdata()
|
|
*
|
|
* ERRNO
|
|
* None
|
|
*/
|
|
IP_EXTERN Ip_u32 ipl2tp_attr_idata(Ipl2tp_attr attr);
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipl2tp_attr_idata64 - Obtain the 64 bit value of an attribute.
|
|
*
|
|
* Obtain the 64 bit value of an attribute.
|
|
*
|
|
* SYNOPSIS
|
|
* \cs
|
|
* void ipl2tp_attr_idata64(Ipl2tp_attr attr, Ip_u64 *val);
|
|
* \ce
|
|
*
|
|
* PARAMETERS
|
|
* \is
|
|
* \i 'attr' Attribute.
|
|
* \i 'val' Where to store the data.
|
|
* \ie
|
|
*
|
|
* RETURNS
|
|
* \is
|
|
* \i Attribute as 64 bit data.
|
|
* \ie
|
|
*
|
|
*
|
|
* EXAMPLE
|
|
* \cs
|
|
* void example(Ipl2tp_attrobj attrobj)
|
|
* {
|
|
* Ipl2tp_attr a;
|
|
* Ip_u64 speed;
|
|
*
|
|
* /@ Loop for all attributes @/
|
|
* for (a = ipl2tp_attr_first(attrobj);
|
|
* a != IP_NULL;
|
|
* a = ipl2tp_attr_next(a))
|
|
* {
|
|
* Ip_u16 tag;
|
|
*
|
|
* /@ Check tag @/
|
|
* switch(tag = ipl2tp_attr_tag(a))
|
|
* {
|
|
* case IPL2TP_SATTR_RW_TX_CONNECT_SPEED:
|
|
* ipl2tp_attr_idata64(a, &speed);
|
|
* printf("Tx Connect Speed: %ld\n",
|
|
* IP_U64_GETLO(speed));
|
|
* break;
|
|
*
|
|
* default:
|
|
* printf("Invalid attribute: %d", (int)tag);
|
|
* break;
|
|
* }
|
|
* }
|
|
* }
|
|
* \ce
|
|
*
|
|
*
|
|
* SEE ALSO
|
|
*
|
|
* ipl2tp_attr_tag(), ipl2tp_attr_length(), ipl2tp_attr_idata(), ipl2tp_attr_pdata(),
|
|
* ipl2tp_attr_keydata(), ipl2tp_attr_vdata(), ipl2tp_attr_addrdata(),
|
|
* ipl2tp_attr_strdata()
|
|
*
|
|
* ERRNO
|
|
* None
|
|
*/
|
|
IP_EXTERN void ipl2tp_attr_idata64(Ipl2tp_attr attr,
|
|
Ip_u64 *val);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipl2tp_attr_pdata - Obtain the pointer value of an attribute.
|
|
*
|
|
* Obtain the pointer value of an attribute.
|
|
*
|
|
* SYNOPSIS
|
|
* \cs
|
|
* void *ipl2tp_attr_pdata(Ipl2tp_attr attr);
|
|
* \ce
|
|
*
|
|
* PARAMETERS
|
|
* \is
|
|
* \i 'attr' Attribute.
|
|
* \ie
|
|
*
|
|
* RETURNS
|
|
* \is
|
|
* \i Attribute value as a pointer.
|
|
* \ie
|
|
*
|
|
*
|
|
* EXAMPLE
|
|
* \cs
|
|
* void example(Ipl2tp_attrobj attrobj)
|
|
* {
|
|
* Ipl2tp_attr a;
|
|
*
|
|
* /@ Loop for all attributes @/
|
|
* for (a = ipl2tp_attr_first(attrobj);
|
|
* a != IP_NULL;
|
|
* a = ipl2tp_attr_next(a))
|
|
* {
|
|
* Ip_u16 tag;
|
|
*
|
|
* /@ Check tag @/
|
|
* switch(tag = ipl2tp_attr_tag(a))
|
|
* {
|
|
* case IPL2TP_SATTR_RW_USER_DATA:
|
|
* printf("User data: %p\n", ipl2tp_attr_pdata(a));
|
|
* break;
|
|
*
|
|
* default:
|
|
* printf("Invalid attribute: %d", (int)tag);
|
|
* break;
|
|
* }
|
|
* }
|
|
* }
|
|
* \ce
|
|
*
|
|
*
|
|
* SEE ALSO
|
|
*
|
|
* ipl2tp_attr_tag(), ipl2tp_attr_length(), ipl2tp_attr_idata(),ipl2tp_attr_strdata(),
|
|
* ipl2tp_attr_keydata(), ipl2tp_attr_vdata(), ipl2tp_attr_addrdata(),
|
|
* ipl2tp_attr_idata64()
|
|
*
|
|
* ERRNO
|
|
* None
|
|
*/
|
|
IP_EXTERN void *ipl2tp_attr_pdata(Ipl2tp_attr attr);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipl2tp_attr_vdata - Retrieve vector data from the attribute.
|
|
*
|
|
* Retrieves the vector data from the attribute.
|
|
*
|
|
* SYNOPSIS
|
|
* \cs
|
|
* union Ip_u8 *ipl2tp_attr_addrdataIpl2tp_attr attr);
|
|
* \ce
|
|
*
|
|
* PARAMETERS
|
|
* \is
|
|
* \i 'attr' Attribute.
|
|
* \ie
|
|
*
|
|
* RETURNS
|
|
* \is
|
|
* \i Attribute as vector data.
|
|
* \ie
|
|
*
|
|
*
|
|
* EXAMPLE
|
|
* \cs
|
|
* void example(Ipl2tp_attrobj attrobj)
|
|
* {
|
|
* Ipl2tp_attr a;
|
|
*
|
|
* /@ Loop for all attributes @/
|
|
* for (a = ipl2tp_attr_first(attrobj); a != IP_NULL; a = ipl2tp_attr_next(a))
|
|
* {
|
|
* Ip_u16 tag;
|
|
* Ip_u8 *vdata;
|
|
*
|
|
* /@ Check tag @/
|
|
* switch(tag = ipl2tp_attr_tag(a))
|
|
* {
|
|
* case
|
|
* IPL2TP_TATTR_RO_l2tpTunnelStatsRemoteProtocolVersion:
|
|
* vdata = ipl2tp_attr_vdata(a);
|
|
* printf("Protocol version: %d.%d" vdata[0], vdata[1]);
|
|
* break;
|
|
*
|
|
* default:
|
|
* printf("Invalid attribute: %d", (int)tag);
|
|
* break;
|
|
* }
|
|
* }
|
|
* }
|
|
* \ce
|
|
*
|
|
*
|
|
* SEE ALSO
|
|
*
|
|
* ipl2tp_attr_tag(), ipl2tp_attr_length(), ipl2tp_attr_idata(), ipl2tp_attr_pdata(),
|
|
* ipl2tp_attr_idata64(), ipl2tp_attr_addrdata(), ipl2tp_attr_strdata(),
|
|
* ipl2tp_attr_keydata()
|
|
*
|
|
* ERRNO
|
|
* None
|
|
*/
|
|
IP_EXTERN Ip_u8 *ipl2tp_attr_vdata(Ipl2tp_attr attr);
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipl2tp_attr_addrdata - Retrieve the address data from the attribute.
|
|
*
|
|
* Retrieve the address data from the attribute.
|
|
*
|
|
* SYNOPSIS
|
|
* \cs
|
|
* union Ip_sockaddr_union *ipl2tp_attr_addrdataIpl2tp_attr attr);
|
|
* \ce
|
|
*
|
|
* PARAMETERS
|
|
* \is
|
|
* \i 'attr' Attribute.
|
|
* \ie
|
|
*
|
|
* RETURNS
|
|
* \is
|
|
* \i Attribute as socket address data.
|
|
* \ie
|
|
*
|
|
*
|
|
* EXAMPLE
|
|
* \cs
|
|
* void example(Ipl2tp_attrobj attrobj)
|
|
* {
|
|
* Ipl2tp_attr a;
|
|
*
|
|
* /@ Loop for all attributes @/
|
|
* for (a = ipl2tp_attr_first(attrobj);
|
|
* a != IP_NULL;
|
|
* a = ipl2tp_attr_next(a))
|
|
* {
|
|
* Ip_u16 tag;
|
|
*
|
|
* /@ Check tag @/
|
|
* switch(tag = ipl2tp_attr_tag(a))
|
|
* {
|
|
* case IPL2TP_TATTR_RO_tunnelRemoteAddress:
|
|
* /@ Print the address data @/
|
|
* break;
|
|
*
|
|
* default:
|
|
* printf("Invalid attribute: %d", (int)tag);
|
|
* break;
|
|
* }
|
|
* }
|
|
* }
|
|
* \ce
|
|
*
|
|
*
|
|
* SEE ALSO
|
|
*
|
|
* ipl2tp_attr_tag(), ipl2tp_attr_length(), ipl2tp_attr_idata(), ipl2tp_attr_pdata(),
|
|
* ipl2tp_attr_idata64(), ipl2tp_attr_vdata(), ipl2tp_attr_strdata(),
|
|
* ipl2tp_attr_keydata()
|
|
*
|
|
* ERRNO
|
|
* None
|
|
*/
|
|
IP_EXTERN union Ip_sockaddr_union *ipl2tp_attr_addrdata(Ipl2tp_attr attr);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipl2tp_attr_strdata - Obtain the pointer value of an attribute.
|
|
*
|
|
* Obtain the pointer value of an attribute.
|
|
*
|
|
* SYNOPSIS
|
|
* \cs
|
|
* char *ipl2tp_attr_pdata(Ipl2tp_attr attr);
|
|
* \ce
|
|
*
|
|
* PARAMETERS
|
|
* \is
|
|
* \i 'attr' Attribute.
|
|
* \ie
|
|
*
|
|
* RETURNS
|
|
* \is
|
|
* \i Attribute value as a string.
|
|
* \ie
|
|
*
|
|
*
|
|
* EXAMPLE
|
|
* \cs
|
|
* void example(Ipl2tp_attrobj attrobj)
|
|
* {
|
|
* Ipl2tp_attr a;
|
|
*
|
|
* /@ Loop for all attributes @/
|
|
* for (a = ipl2tp_attr_first(attrobj);
|
|
* a != IP_NULL;
|
|
* a = ipl2tp_attr_next(a))
|
|
* {
|
|
* Ip_u16 tag;
|
|
*
|
|
* /@ Check tag @/
|
|
* switch(tag = ipl2tp_attr_tag(a))
|
|
* {
|
|
* case IPL2TP_ATTR_RW_HOST_NAME:
|
|
* printf("Host name: %p\n", ipl2tp_attr_strdata(a));
|
|
* break;
|
|
*
|
|
* default:
|
|
* printf("Invalid attribute: %d", (int)tag);
|
|
* break;
|
|
* }
|
|
* }
|
|
* }
|
|
* \ce
|
|
*
|
|
*
|
|
* SEE ALSO
|
|
*
|
|
* ipl2tp_attr_tag(), ipl2tp_attr_length(), ipl2tp_attr_idata(),ipl2tp_attr_pdata(),
|
|
* ipl2tp_attr_keydata(), ipl2tp_attr_vdata(), ipl2tp_attr_addrdata(),
|
|
* ipl2tp_attr_idata64()
|
|
*
|
|
* ERRNO
|
|
* None
|
|
*/
|
|
IP_EXTERN char *ipl2tp_attr_strdata(Ipl2tp_attr attr);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipl2tp_attr_first - Obtain the first attribute from an attribute object.
|
|
*
|
|
* Obtain the first attribute from an attribute object.
|
|
*
|
|
* SYNOPSIS
|
|
* \cs
|
|
* Ipl2tp_attr ipl2tp_attr_first(Ipl2tp_attrobj attrobj);
|
|
* \ce
|
|
*
|
|
* PARAMETERS
|
|
* \is
|
|
* \i 'attrobj' Attribute object.
|
|
* \ie
|
|
*
|
|
* RETURNS
|
|
* \is
|
|
* \i First attribute in attribute object, if success.
|
|
* \i 'IP_NULL' if a bad or empty attribute object is present.
|
|
* \ie
|
|
*
|
|
*
|
|
* EXAMPLE
|
|
* \cs
|
|
* void example(Ipl2tp_attrobj attrobj)
|
|
* {
|
|
* Ipl2tp_attr a;
|
|
*
|
|
* /@ Loop for all attributes @/
|
|
* for (a = ipl2tp_attr_first(attrobj);
|
|
* a != IP_NULL;
|
|
* a = ipl2tp_attr_next(a))
|
|
* {
|
|
* Ip_u16 tag;
|
|
*
|
|
* /@ Check tag @/
|
|
* switch(tag = ipl2tp_attr_tag(a))
|
|
* {
|
|
* case IPL2TP_ATTR_RW_HOST_NAME:
|
|
* printf("Host name: %s\n",ipl2tp_attr_strdata(a));
|
|
* break;
|
|
*
|
|
* default:
|
|
* printf("Invalid attribute: %d", (int)tag);
|
|
* break;
|
|
* }
|
|
* }
|
|
* }
|
|
* \ce
|
|
*
|
|
*
|
|
* SEE ALSO
|
|
*
|
|
* ipl2tp_attr_next()
|
|
*
|
|
* ERRNO
|
|
* None
|
|
*/
|
|
IP_EXTERN Ipl2tp_attr ipl2tp_attr_first(Ipl2tp_attrobj attrobj);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipl2tp_attr_next - Obtain the next attribute from an attribute object.
|
|
*
|
|
* Obtain the next attribute from an attribute object.
|
|
*
|
|
* SYNOPSIS
|
|
* \cs
|
|
* Ipl2tp_attr ipl2tp_attr_next(Ipl2tp_attr attr);
|
|
* \ce
|
|
*
|
|
* PARAMETERS
|
|
* \is
|
|
* \i 'attr' Previous attribute.
|
|
* \ie
|
|
*
|
|
* RETURNS
|
|
* \is
|
|
* \i Next attribute, or IP_NULL if there are no more attributes.
|
|
* \ie
|
|
*
|
|
*
|
|
* EXAMPLE
|
|
* \cs
|
|
* void example(Ipl2tp_attrobj attrobj)
|
|
* {
|
|
* Ipl2tp_attr a;
|
|
*
|
|
* /@ Loop for all attributes @/
|
|
* for (a = ipl2tp_attr_first(attrobj);
|
|
* a != IP_NULL;
|
|
* a = ipl2tp_attr_next(a))
|
|
* {
|
|
* Ip_u16 tag;
|
|
*
|
|
* /@ Check tag @/
|
|
* switch(tag = ipl2tp_attr_tag(a))
|
|
* {
|
|
* case IPL2TP_ATTR_RW_HOST_NAME:
|
|
* printf("Host name: %s\n",ipl2tp_attr_strdata(a));
|
|
* break;
|
|
*
|
|
* default:
|
|
* printf("Invalid attribute: %d", (int)tag);
|
|
* break;
|
|
* }
|
|
* }
|
|
* }
|
|
* \ce
|
|
*
|
|
*
|
|
* SEE ALSO
|
|
*
|
|
* ipl2tp_attr_first()
|
|
*
|
|
* ERRNO
|
|
* None
|
|
*/
|
|
IP_EXTERN Ipl2tp_attr ipl2tp_attr_next(Ipl2tp_attr attr);
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipl2tp_attr_clear - Clear an attribute object.
|
|
*
|
|
* Clear an attribute object. This means that all the attributes are removed from the
|
|
* attribute object.
|
|
*
|
|
* SYNOPSIS
|
|
* \cs
|
|
* Ipl2tp_status ipl2tp_attr_clear(Ipl2tp_attrobj attrobj);
|
|
* \ce
|
|
*
|
|
* PARAMETERS
|
|
* \is
|
|
* \i 'attrobj' Attribute object.
|
|
* \ie
|
|
*
|
|
* RETURNS
|
|
* \is
|
|
* \i 'IPL2TP_STATUS_OK' if success.
|
|
* \i 'IPL2TP_STATUS_BADPARAM' if a bad attribute object is present.
|
|
* \ie
|
|
*
|
|
*
|
|
* EXAMPLE
|
|
* \cs
|
|
* void example(void)
|
|
* {
|
|
* static IPL2TP_ATTR_OBJECT(attrobj, 1);
|
|
*
|
|
* /@ Clear possible old attributes @/
|
|
* ipl2tp_attr_clear(attrobj);
|
|
*
|
|
* /@ Add new attribute @/
|
|
* ipl2tp_attr_iappend(&attrobj, IPL2TP_RUNTIME_LOGLEVEL, 5);
|
|
*
|
|
* /@ Open IPL2TP @/
|
|
* ipl2tp_api_open(attrobj, IP_NULL, IP_NULL, IP_NULL, IP_NULL);
|
|
* }
|
|
* \ce
|
|
*
|
|
* SEE ALSO
|
|
*
|
|
* ipl2tp_attr_new(), ipl2tp_attr_delete()
|
|
*
|
|
* ERRNO
|
|
* None
|
|
*/
|
|
IP_EXTERN Ipl2tp_status ipl2tp_attr_clear(Ipl2tp_attrobj attrobj);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|
|
|
|
/*
|
|
****************************************************************************
|
|
* END OF FILE
|
|
****************************************************************************
|
|
*/
|
|
|