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

📄 lcm_pub.h

📁 abstract rtos
💻 H
字号:
#ifdef __cplusplus#if __cplusplusextern "C"{#endif #endif #ifndef __INC_LCM_PUB_H__#define __INC_LCM_PUB_H__#define N201              260typedef enum enLcmPhyType{    LCM_DRV_HDLC,    LCM_DRV_ETH,    LCM_DRV_UDP4EIA,    LCM_DRV_SERIAL,    LCM_DRV_UDP4SIPTRUNK,    LCM_DRV_BUTT}LCM_PHY_TYPE_E;typedef enum enuLCMPrimType      {    DL_UNIT_DATA_REQUEST     = 0,            DL_UNIT_DATA_INDICATION  = 1,            DL_DATA_REQUEST          = 2,            DL_DATA_INDICATION       = 3,            MDL_ESTABLISH_REQUEST    = 4,            MDL_ESTABLISH_INDICATION = 5,            MDL_ESTABLISH_CONFIRM    = 6,            MDL_RELEASE_REQUEST      = 7,            MDL_RELEASE_INDICATION   = 8,            MDL_RELEASE_CONFIRM      = 9,            MDL_ERROR_INDICATION     = 10,           MDL_L1_FAIL_INDICATION   = 11,               LCM_PRIM_BUTT                     }LCM_PRIM_TYPE_E;typedef enum enuV5DataLinkType{    V5DL_ID_PSTN = 0,                        Q931_DL_BROADCAST = 0,                   V5DL_ID_BCC  = 1,                        Q931_DL_ISDN_1= 1,                       V5DL_ID_CTRL = 2,                        V5DL_ID_LINKC= 3,                        V5DL_ID_PROT1= 4,                        V5DL_ID_PROT2= 5,                        V5DL_ID_ISDN = 6,                        V5DL_ID_DEV_MNGT = 7,                    V5DL_ID_BUTT,}V5DATA_LINK_E;#define LCM_TCP_FIN       0x01#define LCM_TCP_SYN       0x02#define LCM_TCP_RESET     0x04#define LCM_TCP_PUSH      0x08#define LCM_TCP_ACK       0x10#define LCM_TCP_URGENT    0x20#define LCM_TCP_ECN_ECHO  0x40#define LCM_TCP_CWR       0x80 #define LCM_TCP_SYN_ACK   (LCM_TCP_SYN|LCM_TCP_ACK)#define LCM_TCP_PUSH_ACK  (LCM_TCP_PUSH|LCM_TCP_ACK)#ifdef _cplusplustypedef VOID (*VOID_FUNC_PTR)(...);#elsetypedef VOID (*VOID_FUNC_PTR)();#endiftypedef VOID (*LCM_PHY_SND)( U32 port, struct msg_blk * mb );typedef VOID (*LCM_PHY_RCV)( U32 phy, U32 port, struct msg_blk * mb );typedef VOID (*LCM_MBUF_SND)( U32 port, MBUF_S * mbuf );typedef VOID (*LCM_MBUF_RCV)( U32 phy, U32 port, MBUF_S * mbuf );typedef struct tagDLMsg{    U8           ucPrimID;              U8           ucPhyType;             U16          usCommPort;            U8           ucV5DLType;            U8           ucPading;          	S16          sOffset;               U16          usTraceL3Addr;         U16          usLength;              U8           ucInfo[N201];      }DL_MSG_S;VOID lcm_msg_proc( MSG_S *msg, VOID*pvMsgBuf );U32  lcm_init_proc( START_ORDER_E order );U32 lcm_send_data( U32 prim, struct msg_blk *mb );U32 lcm_add_drv( U32 phy_type, U32 mtu, LCM_PHY_SND send_func, LCM_PHY_RCV *recvp );U32 lcm_add_drv_2( U32 phy_type, U32 mtu, LCM_MBUF_SND send_func, LCM_MBUF_RCV *recvp );U32 lcm_set_link_paras( U32 phy_type, U32 n200, U32 t200_len, U32 t203_len );U16 lcm_get_dev_ef_addr();U32 lcm_is_u1000_connected();U32 lcm_is_dl_established( U32 phy_type, U32 port, U32 dl );S8 *lcm_get_prim_string( U32 prim );U32 lcm_is_ui_fram( U8 *ptr );void lcm_udpate_tcp_ack( U32 ack ); VOID lcm_init_rapid_pkt_list( );VOID lcm_rapid_send_to_eth( U16 src_udp_port, struct msg_blk *mb, VOID *addr );VOID lcm_tcp_rapid_send_to_eth( U16 src_udp_port, U32 seq, U32 ack, struct msg_blk *mb, VOID *v_addr );VOID lcm_tcp_rapid_send_to_eth_no_warpper( U16 src_port, U32 seq, U32 ack, struct msg_blk *mb, VOID *v_addr );VOID lcm_send_tcp_signal_to_eth( U32 flag, U16 src_port, U32 seq, U32 ack, VOID *v_addr );VOID lcm_send_tcp_signal_by_if( U32 if_index, U32 flag, U16 src_port, U32 seq, U32 ack, VOID *v_addr );VOID lcm_rapid_send_to_eth_no_wrapper( U16 src_udp_port, struct msg_blk *mb, VOID *v_addr );VOID lcm_rapid_eth_recv_task();U32 drv_eia_get_peer_ip( U16 eiano );U16 drv_eia_get_peer_port( U16 eiano );U32 lcm_is_rapid_pkt( MBUF_S* pMBuf );U32 lcm_rapid_recv_from_eth( MBUF_S* pstMBuf );U32 lcm_get_tcp_iss();void lcm_set_localport(U16 usPort);U32 drv_eia_is_tcp_mode( U16 eiano );VOID lcm_p2p_rapid_fwd(U8 *buf, U32 len, U16 usDstPort, U32 ulSrcIp, U16 usSrcPort);U32 lcm_get_mpe_by_port(U16 usPort);U16 lcm_get_port_by_mpe(U32 ulMpeNo);U32 lcm_get_src_nat_ip(U32 ulSrcIp, U16 usSrcPort);U32 if_get_out_ip_by_dstip(U32 ulDstIp);;U32 if_get_out_ip_by_ifindex(U32 if_index);U32 if_get_ipaddr_by_port(U32 eth_port);U32 lcm_get_local_ip_for_device( U32 devIp, U16 devPort );BOOL_T lcm_is_reservport(U16 usPort);BOOL_T lcm_is_reservport_without_rsock(U16 usPort);BOOL_T lcm_is_port_reserved_for_app(U16 usPortGlobalInside);void if_p2p_send_packet(MBUF_S * mbuf);#endif#ifdef __cplusplus#if __cplusplus}#endif #endif 

⌨️ 快捷键说明

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