EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index

NetworkPkg/TcpDxe/TcpMain.h

Go to the documentation of this file.
00001 
00017 #ifndef _TCP_MAIN_H_
00018 #define _TCP_MAIN_H_
00019 
00020 #include <Protocol/ServiceBinding.h>
00021 #include <Protocol/DriverBinding.h>
00022 #include <Library/IpIoLib.h>
00023 #include <Library/DevicePathLib.h>
00024 
00025 #include "Socket.h"
00026 #include "TcpProto.h"
00027 #include "TcpDriver.h"
00028 #include "TcpFunc.h"
00029 
00030 extern UINT16                        mTcp4RandomPort;
00031 extern UINT16                        mTcp6RandomPort;
00032 extern CHAR16                        *mTcpStateName[];
00033 extern EFI_COMPONENT_NAME_PROTOCOL   gTcpComponentName;
00034 extern EFI_COMPONENT_NAME2_PROTOCOL  gTcpComponentName2;
00035 
00036 extern LIST_ENTRY                    mTcpRunQue;
00037 extern LIST_ENTRY                    mTcpListenQue;
00038 extern TCP_SEQNO                     mTcpGlobalIss;
00039 extern UINT32                        mTcpTick;
00040 
00044 #define TCP6_KEEP_NEIGHBOR_TIME    30
00045 
00046 
00047 
00048 #define TCP6_REFRESH_NEIGHBOR_TICK 25
00049 
00050 #define TCP_EXPIRE_TIME            65535
00051 
00056 #define TCP_BASE_ISS               0x4d7e980b
00057 #define TCP_ISS_INCREMENT_1        2048
00058 #define TCP_ISS_INCREMENT_2        100
00059 
00060 typedef union {
00061   EFI_TCP4_CONFIG_DATA  Tcp4CfgData;
00062   EFI_TCP6_CONFIG_DATA  Tcp6CfgData;
00063 } TCP_CONFIG_DATA;
00064 
00065 typedef union {
00066   EFI_TCP4_ACCESS_POINT  Tcp4Ap;
00067   EFI_TCP6_ACCESS_POINT  Tcp6Ap;
00068 } TCP_ACCESS_POINT;
00069 
00070 typedef struct _TCP4_MODE_DATA {
00071   EFI_TCP4_CONNECTION_STATE       *Tcp4State;
00072   EFI_TCP4_CONFIG_DATA            *Tcp4ConfigData;
00073   EFI_IP4_MODE_DATA               *Ip4ModeData;
00074   EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData;
00075   EFI_SIMPLE_NETWORK_MODE         *SnpModeData;
00076 } TCP4_MODE_DATA;
00077 
00078 typedef struct _TCP6_MODE_DATA {
00079   EFI_TCP6_CONNECTION_STATE       *Tcp6State;
00080   EFI_TCP6_CONFIG_DATA            *Tcp6ConfigData;
00081   EFI_IP6_MODE_DATA               *Ip6ModeData;
00082   EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData;
00083   EFI_SIMPLE_NETWORK_MODE         *SnpModeData;
00084 } TCP6_MODE_DATA;
00085 
00086 typedef struct _TCP4_ROUTE_INFO {
00087   BOOLEAN           DeleteRoute;
00088   EFI_IPv4_ADDRESS  *SubnetAddress;
00089   EFI_IPv4_ADDRESS  *SubnetMask;
00090   EFI_IPv4_ADDRESS  *GatewayAddress;
00091 } TCP4_ROUTE_INFO;
00092 
00093 //
00094 // EFI_TCP4_PROTOCOL definitions.
00095 //
00096 
00120 EFI_STATUS
00121 EFIAPI
00122 Tcp4GetModeData (
00123   IN   EFI_TCP4_PROTOCOL                  *This,
00124   OUT  EFI_TCP4_CONNECTION_STATE          *Tcp4State      OPTIONAL,
00125   OUT  EFI_TCP4_CONFIG_DATA               *Tcp4ConfigData OPTIONAL,
00126   OUT  EFI_IP4_MODE_DATA                  *Ip4ModeData    OPTIONAL,
00127   OUT  EFI_MANAGED_NETWORK_CONFIG_DATA    *MnpConfigData  OPTIONAL,
00128   OUT  EFI_SIMPLE_NETWORK_MODE            *SnpModeData    OPTIONAL
00129   );
00130 
00153 EFI_STATUS
00154 EFIAPI
00155 Tcp4Configure (
00156   IN EFI_TCP4_PROTOCOL        * This,
00157   IN EFI_TCP4_CONFIG_DATA     * TcpConfigData OPTIONAL
00158   );
00159 
00185 EFI_STATUS
00186 EFIAPI
00187 Tcp4Routes (
00188   IN EFI_TCP4_PROTOCOL           *This,
00189   IN BOOLEAN                     DeleteRoute,
00190   IN EFI_IPv4_ADDRESS            *SubnetAddress,
00191   IN EFI_IPv4_ADDRESS            *SubnetMask,
00192   IN EFI_IPv4_ADDRESS            *GatewayAddress
00193   );
00194 
00214 EFI_STATUS
00215 EFIAPI
00216 Tcp4Connect (
00217   IN EFI_TCP4_PROTOCOL           *This,
00218   IN EFI_TCP4_CONNECTION_TOKEN   *ConnectionToken
00219   );
00220 
00241 EFI_STATUS
00242 EFIAPI
00243 Tcp4Accept (
00244   IN EFI_TCP4_PROTOCOL             *This,
00245   IN EFI_TCP4_LISTEN_TOKEN         *ListenToken
00246   );
00247 
00277 EFI_STATUS
00278 EFIAPI
00279 Tcp4Transmit (
00280   IN EFI_TCP4_PROTOCOL            *This,
00281   IN EFI_TCP4_IO_TOKEN            *Token
00282   );
00283 
00315 EFI_STATUS
00316 EFIAPI
00317 Tcp4Receive (
00318   IN EFI_TCP4_PROTOCOL           *This,
00319   IN EFI_TCP4_IO_TOKEN           *Token
00320   );
00321 
00344 EFI_STATUS
00345 EFIAPI
00346 Tcp4Close (
00347   IN EFI_TCP4_PROTOCOL           *This,
00348   IN EFI_TCP4_CLOSE_TOKEN        *CloseToken
00349   );
00350 
00364 EFI_STATUS
00365 EFIAPI
00366 Tcp4Cancel (
00367   IN EFI_TCP4_PROTOCOL             *This,
00368   IN EFI_TCP4_COMPLETION_TOKEN     *Token OPTIONAL
00369   );
00370 
00385 EFI_STATUS
00386 EFIAPI
00387 Tcp4Poll (
00388   IN EFI_TCP4_PROTOCOL        *This
00389   );
00390 
00391 //
00392 // EFI_TCP6_PROTOCOL definitions.
00393 //
00394 
00423 EFI_STATUS
00424 EFIAPI
00425 Tcp6GetModeData (
00426   IN  EFI_TCP6_PROTOCOL                  *This,
00427   OUT EFI_TCP6_CONNECTION_STATE          *Tcp6State      OPTIONAL,
00428   OUT EFI_TCP6_CONFIG_DATA               *Tcp6ConfigData OPTIONAL,
00429   OUT EFI_IP6_MODE_DATA                  *Ip6ModeData    OPTIONAL,
00430   OUT EFI_MANAGED_NETWORK_CONFIG_DATA    *MnpConfigData  OPTIONAL,
00431   OUT EFI_SIMPLE_NETWORK_MODE            *SnpModeData    OPTIONAL
00432   );
00433 
00481 EFI_STATUS
00482 EFIAPI
00483 Tcp6Configure (
00484   IN EFI_TCP6_PROTOCOL        *This,
00485   IN EFI_TCP6_CONFIG_DATA     *Tcp6ConfigData OPTIONAL
00486   );
00487 
00518 EFI_STATUS
00519 EFIAPI
00520 Tcp6Connect (
00521   IN EFI_TCP6_PROTOCOL           *This,
00522   IN EFI_TCP6_CONNECTION_TOKEN   *ConnectionToken
00523   );
00524 
00561 EFI_STATUS
00562 EFIAPI
00563 Tcp6Accept (
00564   IN EFI_TCP6_PROTOCOL             *This,
00565   IN EFI_TCP6_LISTEN_TOKEN         *ListenToken
00566   );
00567 
00605 EFI_STATUS
00606 EFIAPI
00607 Tcp6Transmit (
00608   IN EFI_TCP6_PROTOCOL            *This,
00609   IN EFI_TCP6_IO_TOKEN            *Token
00610   );
00611 
00658 EFI_STATUS
00659 EFIAPI
00660 Tcp6Receive (
00661   IN EFI_TCP6_PROTOCOL           *This,
00662   IN EFI_TCP6_IO_TOKEN           *Token
00663   );
00664 
00692 EFI_STATUS
00693 EFIAPI
00694 Tcp6Close (
00695   IN EFI_TCP6_PROTOCOL           *This,
00696   IN EFI_TCP6_CLOSE_TOKEN        *CloseToken
00697   );
00698 
00728 EFI_STATUS
00729 EFIAPI
00730 Tcp6Cancel (
00731   IN EFI_TCP6_PROTOCOL           *This,
00732   IN EFI_TCP6_COMPLETION_TOKEN   *Token OPTIONAL
00733   );
00734 
00752 EFI_STATUS
00753 EFIAPI
00754 Tcp6Poll (
00755   IN EFI_TCP6_PROTOCOL        *This
00756   );
00757 
00758 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines