ReactOS 0.4.15-dev-8348-gc1b9bb5
loopback.h File Reference
#include <lan.h>
Include dependency graph for loopback.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

NDIS_STATUS LoopRegisterAdapter (PNDIS_STRING AdapterName, PLAN_ADAPTER *Adapter)
 
NDIS_STATUS LoopUnregisterAdapter (PLAN_ADAPTER Adapter)
 

Variables

PIP_INTERFACE Loopback
 

Function Documentation

◆ LoopRegisterAdapter()

NDIS_STATUS LoopRegisterAdapter ( PNDIS_STRING  AdapterName,
PLAN_ADAPTER Adapter 
)

Definition at line 96 of file loopback.c.

107{
108 LLIP_BIND_INFO BindInfo;
109
110 TI_DbgPrint(MID_TRACE, ("Called.\n"));
111
112 /* Bind the adapter to network (IP) layer */
113 BindInfo.Context = NULL;
114 BindInfo.HeaderSize = 0;
115 BindInfo.MinFrameSize = 0;
116 BindInfo.Address = NULL;
117 BindInfo.AddressLength = 0;
118 BindInfo.Transmit = LoopTransmit;
119
120 Loopback = IPCreateInterface(&BindInfo);
121 if (!Loopback) return NDIS_STATUS_RESOURCES;
122
123 Loopback->MTU = 16384;
124
125 Loopback->Name.Buffer = L"Loopback";
127 (USHORT)wcslen(Loopback->Name.Buffer) * sizeof(WCHAR);
128
132
134
136
137 TI_DbgPrint(MAX_TRACE, ("Leaving.\n"));
138
139 return NDIS_STATUS_SUCCESS;
140}
#define AddrInitIPv4(IPAddress, RawAddress)
Definition: address.h:16
#define MID_TRACE
Definition: debug.h:15
#define MAX_TRACE
Definition: debug.h:16
#define NULL
Definition: types.h:112
#define TI_DbgPrint(_t_, _x_)
Definition: debug.h:45
#define LOOPBACK_ADDRMASK_IPv4
Definition: ip.h:188
VOID IPAddInterfaceRoute(PIP_INTERFACE IF)
Definition: ip.c:262
#define LOOPBACK_ADDRESS_IPv4
Definition: ip.h:186
BOOLEAN IPRegisterInterface(PIP_INTERFACE IF)
Definition: ip.c:289
PIP_INTERFACE IPCreateInterface(PLLIP_BIND_INFO BindInfo)
Definition: ip.c:182
#define LOOPBACK_BCASTADDR_IPv4
Definition: ip.h:187
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
PIP_INTERFACE Loopback
Definition: loopback.c:13
VOID LoopTransmit(PVOID Context, PNDIS_PACKET NdisPacket, UINT Offset, PVOID LinkAddress, USHORT Type)
Definition: loopback.c:26
#define NDIS_STATUS_SUCCESS
Definition: ndis.h:346
#define NDIS_STATUS_RESOURCES
Definition: ndis.h:466
#define L(x)
Definition: ntvdm.h:50
unsigned short USHORT
Definition: pedump.c:61
IP_ADDRESS Broadcast
Definition: ip.h:162
UNICODE_STRING Name
Definition: ip.h:163
IP_ADDRESS Unicast
Definition: ip.h:159
IP_ADDRESS Netmask
Definition: ip.h:161
UINT MTU
Definition: ip.h:157
PUCHAR Address
Definition: ip.h:130
UINT MinFrameSize
Definition: ip.h:129
PVOID Context
Definition: ip.h:127
UINT HeaderSize
Definition: ip.h:128
UINT AddressLength
Definition: ip.h:131
LL_TRANSMIT_ROUTINE Transmit
Definition: ip.h:132
USHORT MaximumLength
Definition: env_spec_w32.h:370
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by DriverEntry().

◆ LoopUnregisterAdapter()

NDIS_STATUS LoopUnregisterAdapter ( PLAN_ADAPTER  Adapter)

Definition at line 143 of file loopback.c.

154{
155 TI_DbgPrint(MID_TRACE, ("Called.\n"));
156
157 if (Loopback != NULL)
158 {
161 Loopback = NULL;
162 }
163
164 TI_DbgPrint(MAX_TRACE, ("Leaving.\n"));
165
166 return NDIS_STATUS_SUCCESS;
167}
VOID IPDestroyInterface(PIP_INTERFACE IF)
Definition: ip.c:244
VOID IPUnregisterInterface(PIP_INTERFACE IF)
Definition: ip.c:349

Referenced by TiUnload().

Variable Documentation

◆ Loopback