#include "precomp.h"
#include "lwip/pbuf.h"
#include "lwip/netifapi.h"
#include "lwip/ip.h"
#include "lwip/api.h"
#include "lwip/tcpip.h"
#include <ipifcons.h>
Go to the source code of this file.
◆ TCPInterfaceInit()
Definition at line 95 of file if.c.
96{
98
101
104
107
109
111
113
114 return 0;
115}
err_t TCPSendDataCallback(struct netif *netif, struct pbuf *p, const ip4_addr_t *dest)
VOID TCPUpdateInterfaceIPInformation(PIP_INTERFACE IF)
VOID TCPUpdateInterfaceLinkStatus(PIP_INTERFACE IF)
#define NETIF_FLAG_BROADCAST
u8_t hwaddr[NETIF_MAX_HWADDR_LEN]
#define RtlCopyMemory(Destination, Source, Length)
Referenced by TCPRegisterInterface().
◆ TCPRegisterInterface()
Definition at line 118 of file if.c.
119{
123
124 gw.addr = 0;
125 ipaddr.addr = 0;
126 netmask.addr = 0;
127
129 &ipaddr,
130 &netmask,
131 &gw,
132 IF,
135}
err_t TCPInterfaceInit(struct netif *netif)
err_t tcpip_input(struct pbuf *p, struct netif *inp)
struct netif * netif_add(struct netif *netif, void *state, netif_init_fn init, netif_input_fn input)
Referenced by IPCreateInterface().
◆ TCPSendDataCallback()
Definition at line 12 of file if.c.
13{
21
22
23
24 if (((*(
u8_t*)
p->payload) & 0xF0) == 0x40)
25 {
27
30
33 }
34 else
35 {
37 }
38
40
42 {
44 }
45
48 {
50 }
51
54
56
60 {
66 }
68
73
77
78 return 0;
79}
#define NT_SUCCESS(StatCode)
PIP_PACKET IPInitializePacket(PIP_PACKET IPPacket, ULONG Type)
PNEIGHBOR_CACHE_ENTRY RouteGetRouteToDestination(PIP_ADDRESS Destination)
void GetDataPtr(PNDIS_PACKET Packet, UINT Offset, PCHAR *DataOut, PUINT Size)
#define AllocatePacketWithBuffer(x, y, z)
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
#define NDIS_STATUS_SUCCESS
_In_ ULONG _In_ ULONG _In_ ULONG Length
NTSTATUS IPSendDatagram(PIP_PACKET IPPacket, PNEIGHBOR_CACHE_ENTRY NCE)
_Must_inspect_result_ _In_ ULONG _In_ PSOCKADDR LocalAddress
_Must_inspect_result_ _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR RemoteAddress
Referenced by TCPInterfaceInit().
◆ TCPUnregisterInterface()
◆ TCPUpdateInterfaceIPInformation()
Definition at line 144 of file if.c.
145{
149
150 gw.addr = 0;
151
155
159
160 netif_set_addr(IF->
TCPContext, &ipaddr, &netmask, &gw);
161
162 if (ipaddr.addr != 0)
163 {
166 }
167 else
168 {
170 }
171}
void netif_set_down(struct netif *netif)
void netif_set_default(struct netif *netif)
void netif_set_up(struct netif *netif)
NTSTATUS GetInterfaceIPv4Address(PIP_INTERFACE Interface, ULONG Type, PULONG Address)
Referenced by IPAddInterfaceRoute(), ReconfigureAdapter(), and TCPInterfaceInit().
◆ TCPUpdateInterfaceLinkStatus()
Definition at line 82 of file if.c.
83{
84 ULONG OperationalStatus;
85
87
90 else
92}
void netif_set_link_down(struct netif *netif)
void netif_set_link_up(struct netif *netif)
#define MIB_IF_OPER_STATUS_OPERATIONAL
VOID GetInterfaceConnectionStatus(PIP_INTERFACE Interface, PULONG OperStatus)
Referenced by ReconfigureAdapter(), and TCPInterfaceInit().