Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

llipif0.h

Go to the documentation of this file.
00001 /********************************************************************/ 00004 /********************************************************************/ 00005 /* :ts=4 */ 00006 00007 //** LLIPIF0.H - Lower layer IP interface definitions. (Version 0) 00008 // 00009 // This file contains the definitions defining the interface between IP 00010 // and a lower layer, such as ARP or SLIP. 00011 // 00012 // 00013 // Modifications: 00014 // 00015 // Feb 12, 97 ArvindM Created this by making a copy of the existing 00016 // llipif.h, as a snapshot of the pre NT 5.0 00017 // version. 00018 // 00019 00020 #ifndef LLIPIF0_INCLUDED 00021 #define LLIPIF0_INCLUDED 00022 00023 // Typedefs for function pointers passed to ARPRegister. 00024 typedef void (__stdcall *IPRcvRtn)(void *, void *, uint , uint , NDIS_HANDLE , uint, 00025 uint); 00026 typedef void (__stdcall *IPTDCmpltRtn)(void *, PNDIS_PACKET , NDIS_STATUS , uint ); 00027 typedef void (__stdcall *IPTxCmpltRtn)(void *, PNDIS_PACKET , NDIS_STATUS ); 00028 typedef void (__stdcall *IPStatusRtn)(void *, uint, void *, uint); 00029 typedef void (__stdcall *IPRcvCmpltRtn)(void); 00030 00031 typedef int (__stdcall *LLIPRegRtn)(PNDIS_STRING, void *, IPRcvRtn, IPTxCmpltRtn, 00032 IPStatusRtn, IPTDCmpltRtn, IPRcvCmpltRtn, struct LLIPBindInfo *, uint); 00033 00034 #define LLIP_ADDR_LOCAL 0 00035 #define LLIP_ADDR_MCAST 1 00036 #define LLIP_ADDR_BCAST 2 00037 #define LLIP_ADDR_PARP 4 00038 00039 // Structure of information returned from ARP register call. 00040 struct LLIPBindInfo { 00041 void *lip_context; // LL context handle. 00042 uint lip_mss; // Maximum segment size. 00043 uint lip_speed; // Speed of this i/f. 00044 uint lip_index; // Interface index ID. 00045 NDIS_STATUS (__stdcall *lip_transmit)(void *, PNDIS_PACKET, IPAddr, RouteCacheEntry *); 00046 NDIS_STATUS (__stdcall *lip_transfer)(void *, NDIS_HANDLE, uint, uint, uint, PNDIS_PACKET, 00047 uint *); // Pointer to transfer data routine. 00048 void (__stdcall *lip_close)(void *); 00049 uint (__stdcall *lip_addaddr)(void *, uint, IPAddr, IPMask, void *); 00050 uint (__stdcall *lip_deladdr)(void *, uint, IPAddr, IPMask); 00051 void (__stdcall *lip_invalidate)(void *, RouteCacheEntry *); 00052 void (__stdcall *lip_open)(void *); 00053 int (__stdcall *lip_qinfo)(void *, struct TDIObjectID *, PNDIS_BUFFER, 00054 uint *, void *); 00055 int (__stdcall *lip_setinfo)(void *, struct TDIObjectID *, void *, uint); 00056 int (__stdcall *lip_getelist)(void *, void *, uint *); 00057 uint lip_flags; // Flags for this interface. 00058 uint lip_addrlen; // Length in bytes of address. 00059 uchar *lip_addr; // Pointer to interface address. 00060 }; /* LLIPBindInfo */ 00061 00062 #define LIP_COPY_FLAG 1 // Copy lookahead flag. 00063 #define LIP_P2P_FLAG 2 // Interface is point to point 00064 00065 typedef struct LLIPBindInfo LLIPBindInfo; 00066 00067 //* Status codes from the lower layer. 00068 #define LLIP_STATUS_MTU_CHANGE 1 00069 #define LLIP_STATUS_SPEED_CHANGE 2 00070 #define LLIP_STATUS_ADDR_MTU_CHANGE 3 00071 00072 //* The LLIP_STATUS_MTU_CHANGE passed a pointer to this structure. 00073 struct LLIPMTUChange { 00074 uint lmc_mtu; // New MTU. 00075 }; /* LLIPMTUChange */ 00076 00077 typedef struct LLIPMTUChange LLIPMTUChange; 00078 00079 //* The LLIP_STATUS_SPEED_CHANGE passed a pointer to this structure. 00080 struct LLIPSpeedChange { 00081 uint lsc_speed; // New speed. 00082 }; /* LLIPSpeedChange */ 00083 00084 typedef struct LLIPSpeedChange LLIPSpeedChange; 00085 00086 //* The LLIP_STATUS_ADDR_MTU_CHANGE passed a pointer to this structure. 00087 struct LLIPAddrMTUChange { 00088 uint lam_mtu; // New MTU. 00089 uint lam_addr; // Address that changed. 00090 }; /* LLIPAddrMTUChange */ 00091 00092 typedef struct LLIPAddrMTUChange LLIPAddrMTUChange; 00093 00094 #ifdef NT 00095 00096 // 00097 // Registration IOCTL code definition - 00098 // 00099 // This IOCTL is issued to a lower layer driver to retrieve the address 00100 // of its registration function. There is no input buffer. The output 00101 // buffer will contain a LLIPIF_REGISTRATION_DATA structure. This 00102 // buffer is pointed to by Irp->AssociatedIrp.SystemBuffer and should be 00103 // filled in before completion. 00104 // 00105 00106 // 00107 // structure passed in the registration IOCTL. 00108 // 00109 typedef struct llipif_registration_data { 00110 LLIPRegRtn RegistrationFunction; 00111 } LLIPIF_REGISTRATION_DATA; 00112 00113 00114 extern IP_STATUS IPAddInterface(PNDIS_STRING ConfigName, void *PNP, 00115 void *Context, LLIPRegRtn RegRtn, LLIPBindInfo *BindInfo); 00116 extern void IPDelInterface(void *Context); 00117 00118 // Definiton for IPAddInterfacePtr and IPDelInterfacePtr routines 00119 // 00120 typedef IP_STATUS (*IPAddInterfacePtr)(PNDIS_STRING ConfigName, 00121 void *PNPContext, 00122 void *Context, 00123 LLIPRegRtn RegRtn, 00124 LLIPBindInfo *BindInfo); 00125 00126 typedef IP_STATUS (*IPDelInterfacePtr)(void *Context) ; 00127 00128 //* Structure used in IOCTL_IP_GET_PNP_ARP_POINTERS ioctl sent to \device\ip by ARP modules 00129 // 00130 typedef struct ip_get_arp_pointers { 00131 IPAddInterfacePtr IPAddInterface ; // Pointer to IP's add interface routine 00132 IPDelInterfacePtr IPDelInterface ; // Pointer to IP's del interface routine 00133 } IP_GET_PNP_ARP_POINTERS, *PIP_GET_PNP_ARP_POINTERS ; 00134 00135 00136 #define FSCTL_LLIPIF_BASE FILE_DEVICE_NETWORK 00137 00138 #define _LLIPIF_CTL_CODE(function, method, access) \ 00139 CTL_CODE(FSCTL_LLIPIF_BASE, function, method, access) 00140 00141 00142 #define IOCTL_LLIPIF_REGISTER \ 00143 _LLIPIF_CTL_CODE(0, METHOD_BUFFERED, FILE_ANY_ACCESS) 00144 00145 #endif // NT 00146 00147 00148 #endif // LLIPIF0_INCLUDED

Generated on Sat May 15 19:40:38 2004 for test by doxygen 1.3.7