⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ncp_defs.h

📁 PPP协议C语言源程序
💻 H
字号:
/***************************************************************************
*
*      Copyright (c) 1997 - 2001 by Accelerated Technology, Inc.
*
* PROPRIETARY RIGHTS of Accelerated Technology are involved in the subject
* matter of this material.  All manufacturing, reproduction, use and sales
* rights pertaining to this subject matter are governed by the license
* agreement.  The recipient of this software implicity accepts the terms
* of the license.
*
***************************************************************************/
/***************************************************************************
*
*   FILENAME                                                VERSION
*
*       NCP_DEFS.H                                          2.4
*
*   COMPONENT
*
*       NCP
*
*   DESCRIPTION
*
*       This file contains constant definitions and structure definitions
*       to support the file ncp.c
*
*   DATA STRUCTURES
*
*       NU_NCP_OPTIONS
*       IPCP_LAYER
*
*   DEPENDENCIES
*
*       None
*
***************************************************************************/
#ifndef NCP_DEFS_H
#define NCP_DEFS_H

#define NCP_IP_COMPRESSION          2
#define NCP_IP_ADDRESS              3
#define IP_ADDRESS_LENGTH           4
#define NCP_IP_ADDRESS_LENGTH       6
#define NCP_PRIMARY_DNS_ADDRESS     129
#define NCP_SECONDARY_DNS_ADDRESS   131

#define NCP_CLIENT                  5
#define NCP_SERVER                  10

/* NCP options structure */
typedef struct _ncp_opts_struct
{
    UINT8   use_primary_dns_server;         /* will we negotiate the
                                               primary DNS servers address  */
    UINT8   use_secondary_dns_server;       /* will we negotiate the
                                               secondary DNS servers address*/
    UINT8   use_IpVanJacobsonCompression;   /* We do not support this compression */
} NCP_OPTIONS;

/* define the ncp options to a Nucleus type for application use. */
typedef struct _ncp_opts_struct   NU_NCP_OPTIONS;

/* Define the stucture to hold information about the Network Control
   Protocol (NCP) - Internet Protocol Control Protocol (IPCP) */
typedef struct _ipcp_layer
{
    NU_TIMER    restart_timer;
#if (INCLUDE_PPP_MIB == NU_TRUE)
    NU_TIMER    snmp_timer;
#endif
    NET_BUFFER  *negotiation_pkt;
    NCP_OPTIONS network_options;
    UINT8       mode;
    UINT8       state;
    UINT8       identifier;
    INT8        num_transmissions;
    UINT8       assigned_peer_ip_address [IP_ADDRESS_LENGTH];
    UINT8       local_ip_address [IP_ADDRESS_LENGTH];
    UINT8       primary_dns_server [IP_ADDRESS_LENGTH];
    UINT8       secondary_dns_server [IP_ADDRESS_LENGTH];
} IPCP_LAYER;


#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -