ReactOS 0.4.15-dev-7788-g1ad9096
tcpip.h File Reference
#include <ntddk.h>
#include <ndis.h>
#include <tdikrnl.h>
#include <tdiinfo.h>
#include <debug.h>
#include <titypes.h>
#include <ticonsts.h>
#include "lwip/sockets.h"
Include dependency graph for tcpip.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  in_addr
 
struct  TDIEntityInfo
 

Macros

#define TAG_STRING   ' RTS' /* string */
 
#define IO_NETWORK_INCREMENT   2
 
#define MIN(value1, value2)    ((value1 < value2)? value1 : value2)
 
#define MAX(value1, value2)    ((value1 > value2)? value1 : value2)
 
#define NDIS_BUFFER_TAG   FOURCC('n','b','u','f')
 
#define NDIS_PACKET_TAG   FOURCC('n','p','k','t')
 
#define DN2H(dw)    (dw)
 
#define DH2N(dw)    (dw)
 
#define WN2H(w)    (w)
 
#define WH2N(w)    (w)
 
#define AF_INET   2
 
#define SOCK_STREAM   1
 
#define s_addr   S_un.S_addr
 
#define s_host   S_un.S_un_b.s_b2
 
#define s_net   S_un.S_un_b.s_b1
 
#define s_imp   S_un.S_un_w.s_w2
 
#define s_impno   S_un.S_un_b.s_b4
 
#define s_lh   S_un.S_un_b.s_b3
 
#define __LWIP_INET_H__
 
#define htons(x)   WH2N(x)
 

Typedefs

typedef unsigned char u_char
 
typedef unsigned short u_short
 
typedef unsigned int u_int
 
typedef unsigned long u_long
 

Functions

NTSTATUS TiGetProtocolNumber (PUNICODE_STRING FileName, PULONG Protocol)
 

Variables

PDEVICE_OBJECT TCPDeviceObject
 
PDEVICE_OBJECT UDPDeviceObject
 
PDEVICE_OBJECT IPDeviceObject
 
PDEVICE_OBJECT RawIPDeviceObject
 
LIST_ENTRY InterfaceListHead
 
KSPIN_LOCK InterfaceListLock
 
LIST_ENTRY AddressFileListHead
 
KSPIN_LOCK AddressFileListLock
 
NDIS_HANDLE GlobalPacketPool
 
NDIS_HANDLE GlobalBufferPool
 
KSPIN_LOCK EntityListLock
 
TDIEntityInfoEntityList
 
ULONG EntityCount
 
ULONG EntityMax
 

Macro Definition Documentation

◆ __LWIP_INET_H__

#define __LWIP_INET_H__

Definition at line 141 of file tcpip.h.

◆ AF_INET

#define AF_INET   2

Definition at line 117 of file tcpip.h.

◆ DH2N

#define DH2N (   dw)     (dw)

Definition at line 103 of file tcpip.h.

◆ DN2H

#define DN2H (   dw)     (dw)

Definition at line 99 of file tcpip.h.

◆ htons

#define htons (   x)    WH2N(x)

Definition at line 153 of file tcpip.h.

◆ IO_NETWORK_INCREMENT

#define IO_NETWORK_INCREMENT   2

Definition at line 43 of file tcpip.h.

◆ MAX

#define MAX (   value1,
  value2 
)     ((value1 > value2)? value1 : value2)

Definition at line 62 of file tcpip.h.

◆ MIN

#define MIN (   value1,
  value2 
)     ((value1 < value2)? value1 : value2)

Definition at line 59 of file tcpip.h.

◆ NDIS_BUFFER_TAG

#define NDIS_BUFFER_TAG   FOURCC('n','b','u','f')

Definition at line 65 of file tcpip.h.

◆ NDIS_PACKET_TAG

#define NDIS_PACKET_TAG   FOURCC('n','p','k','t')

Definition at line 66 of file tcpip.h.

◆ s_addr

#define s_addr   S_un.S_addr

Definition at line 133 of file tcpip.h.

◆ s_host

#define s_host   S_un.S_un_b.s_b2

Definition at line 134 of file tcpip.h.

◆ s_imp

#define s_imp   S_un.S_un_w.s_w2

Definition at line 136 of file tcpip.h.

◆ s_impno

#define s_impno   S_un.S_un_b.s_b4

Definition at line 137 of file tcpip.h.

◆ s_lh

#define s_lh   S_un.S_un_b.s_b3

Definition at line 138 of file tcpip.h.

◆ s_net

#define s_net   S_un.S_un_b.s_b1

Definition at line 135 of file tcpip.h.

◆ SOCK_STREAM

#define SOCK_STREAM   1

Definition at line 118 of file tcpip.h.

◆ TAG_STRING

#define TAG_STRING   ' RTS' /* string */

Definition at line 33 of file tcpip.h.

◆ WH2N

#define WH2N (   w)     (w)

Definition at line 111 of file tcpip.h.

◆ WN2H

#define WN2H (   w)     (w)

Definition at line 107 of file tcpip.h.

Typedef Documentation

◆ u_char

typedef unsigned char u_char

Definition at line 121 of file tcpip.h.

◆ u_int

typedef unsigned int u_int

Definition at line 123 of file tcpip.h.

◆ u_long

typedef unsigned long u_long

Definition at line 124 of file tcpip.h.

◆ u_short

Definition at line 122 of file tcpip.h.

Function Documentation

◆ TiGetProtocolNumber()

NTSTATUS TiGetProtocolNumber ( PUNICODE_STRING  FileName,
PULONG  Protocol 
)

Definition at line 3 of file proto.c.

14{
18 PWSTR Name;
19
20 TI_DbgPrint(MAX_TRACE, ("Called. FileName (%wZ).\n", FileName));
21
22 Name = FileName->Buffer;
23
24 if (*Name++ != (WCHAR)L'\\')
26
27 if (*Name == L'\0')
29
31
33 if (!NT_SUCCESS(Status) || ((Value > 255)))
35
36 *Protocol = Value;
37
38 return STATUS_SUCCESS;
39}
struct NameRec_ * Name
Definition: cdprocs.h:460
LONG NTSTATUS
Definition: precomp.h:26
#define MAX_TRACE
Definition: debug.h:16
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define TI_DbgPrint(_t_, _x_)
Definition: debug.h:45
Status
Definition: gdiplustypes.h:25
static const BYTE us[]
Definition: encode.c:689
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToInteger(PUNICODE_STRING String, ULONG Base, PULONG Value)
#define L(x)
Definition: ntvdm.h:50
#define STATUS_SUCCESS
Definition: shellext.h:65
uint16_t * PWSTR
Definition: typedefs.h:56
uint32_t ULONG
Definition: typedefs.h:59
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by TiCreateFileObject().

Variable Documentation

◆ AddressFileListHead

LIST_ENTRY AddressFileListHead
extern

◆ AddressFileListLock

KSPIN_LOCK AddressFileListLock
extern

◆ EntityCount

◆ EntityList

◆ EntityListLock

◆ EntityMax

ULONG EntityMax
extern

Definition at line 29 of file main.c.

Referenced by DriverEntry().

◆ GlobalBufferPool

◆ GlobalPacketPool

NDIS_HANDLE GlobalPacketPool
extern

◆ InterfaceListHead

LIST_ENTRY InterfaceListHead
extern

Definition at line 17 of file ip.c.

Referenced by IPRegisterInterface().

◆ InterfaceListLock

KSPIN_LOCK InterfaceListLock
extern

Definition at line 18 of file ip.c.

Referenced by IPRegisterInterface(), and IPUnregisterInterface().

◆ IPDeviceObject

PDEVICE_OBJECT IPDeviceObject
extern

Definition at line 22 of file main.c.

Referenced by DriverEntry(), TiCreateFileObject(), TiSecurityStartup(), and TiUnload().

◆ RawIPDeviceObject

PDEVICE_OBJECT RawIPDeviceObject
extern

Definition at line 23 of file main.c.

Referenced by DriverEntry(), TiCreateFileObject(), and TiUnload().

◆ TCPDeviceObject

PDEVICE_OBJECT TCPDeviceObject
extern

◆ UDPDeviceObject

PDEVICE_OBJECT UDPDeviceObject
extern

Definition at line 21 of file main.c.

Referenced by DriverEntry(), TiCreateFileObject(), and TiUnload().