ReactOS  0.4.14-dev-55-g2da92ac
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

typedef unsigned short 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 {
17  ULONG Value;
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'\\')
25  return STATUS_UNSUCCESSFUL;
26 
27  if (*Name == L'\0')
28  return STATUS_UNSUCCESSFUL;
29 
31 
33  if (!NT_SUCCESS(Status) || ((Value > 255)))
34  return STATUS_UNSUCCESSFUL;
35 
36  *Protocol = Value;
37 
38  return STATUS_SUCCESS;
39 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
#define TI_DbgPrint(_t_, _x_)
Definition: debug.h:45
static const BYTE us[]
Definition: encode.c:689
uint16_t * PWSTR
Definition: typedefs.h:54
LONG NTSTATUS
Definition: precomp.h:26
struct NameRec_ * Name
Definition: cdprocs.h:464
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
static const WCHAR L[]
Definition: oid.c:1250
Status
Definition: gdiplustypes.h:24
#define MAX_TRACE
Definition: debug.h:16
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToInteger(PUNICODE_STRING String, ULONG Base, PULONG Value)
unsigned int ULONG
Definition: retypes.h:1
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
return STATUS_SUCCESS
Definition: btrfs.c:2966

Referenced by RunTest(), and TiCreateFileObject().

Variable Documentation

◆ AddressFileListHead

LIST_ENTRY AddressFileListHead

◆ AddressFileListLock

KSPIN_LOCK AddressFileListLock

◆ EntityCount

◆ EntityList

◆ EntityListLock

◆ EntityMax

ULONG EntityMax

Definition at line 25 of file main.c.

Referenced by DriverEntry().

◆ GlobalBufferPool

◆ GlobalPacketPool

◆ InterfaceListHead

LIST_ENTRY InterfaceListHead

Definition at line 17 of file ip.c.

Referenced by IPRegisterInterface().

◆ InterfaceListLock

KSPIN_LOCK InterfaceListLock

Definition at line 18 of file ip.c.

Referenced by IPRegisterInterface(), and IPUnregisterInterface().

◆ IPDeviceObject

PDEVICE_OBJECT IPDeviceObject

Definition at line 18 of file main.c.

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

◆ RawIPDeviceObject

PDEVICE_OBJECT RawIPDeviceObject

Definition at line 19 of file main.c.

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

◆ TCPDeviceObject

PDEVICE_OBJECT TCPDeviceObject

Definition at line 16 of file main.c.

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

◆ UDPDeviceObject

PDEVICE_OBJECT UDPDeviceObject

Definition at line 17 of file main.c.

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