31 #ifndef SYSTEM_CORE_INC_NET_PROTOCOLS_TCP_OC_TCP_H_ 32 #define SYSTEM_CORE_INC_NET_PROTOCOLS_TCP_OC_TCP_H_ 34 #include <oc_errors.h> 46 #define _________________________________________MACROS_SECTION_____________________________________________________________________________ 48 #if CFG_ENABLE_TCP_LOGS == ON 49 # define tcplog( LogType, ... ) kdebuglog(LogType, __VA_ARGS__) 51 # define tcplog( LogType, ... ) 54 #undef _________________________________________MACROS_SECTION_____________________________________________________________________________ 64 #define _________________________________________TYPES_SECTION______________________________________________________________________________ 331 oC_Tcp_Port_NumberOfSpecialPorts = 1024 ,
352 uint16_t DestinationPort;
353 uint32_t SequenceNumber;
354 uint32_t AcknowledgmentNumber;
355 uint32_t DataOffset:4;
386 uint16_t UrgentPointer;
387 #elif !defined(BIG_ENDIAN) 388 # error Structure is not defined for BIG_ENDIAN 390 # error Endianess is not defined 425 oC_Tcp_OptionKind_End = 0x00 ,
426 oC_Tcp_OptionKind_Nop = 0x01 ,
427 oC_Tcp_OptionKind_MaxSegmentSize = 0x02 ,
428 oC_Tcp_OptionKind_WindowScale = 0x03 ,
429 oC_Tcp_OptionKind_SackPermitted = 0x04 ,
430 oC_Tcp_OptionKind_Sack = 0x05 ,
431 oC_Tcp_OptionKind_Echo = 0x06 ,
432 oC_Tcp_OptionKind_EchoReplay = 0x07 ,
433 oC_Tcp_OptionKind_Timestamps = 0x08 ,
434 oC_Tcp_OptionKind_PartialOrderConnectionPermitted = 0x09 ,
435 oC_Tcp_OptionKind_PartialOrderServiceProfile = 0x0A ,
436 oC_Tcp_OptionKind_CC = 0x0B ,
437 oC_Tcp_OptionKind_CCNew = 0x0C ,
438 oC_Tcp_OptionKind_CCEcho = 0x0D ,
439 oC_Tcp_OptionKind_TcpAlternateChecksumRequest = 0x0E ,
440 oC_Tcp_OptionKind_TcpAlternateChecksumData = 0x0F ,
441 oC_Tcp_OptionKind_Skeeter = 0x10 ,
442 oC_Tcp_OptionKind_Bubba = 0x11 ,
443 oC_Tcp_OptionKind_TrailerChecksum = 0x12 ,
444 oC_Tcp_OptionKind_Md5Signature = 0x13 ,
445 oC_Tcp_OptionKind_ScpsCapabilities = 0x14 ,
446 oC_Tcp_OptionKind_SelectiveNegativeAcknowledgements = 0x15 ,
447 oC_Tcp_OptionKind_RecordBoundaries = 0x16 ,
448 oC_Tcp_OptionKind_CorruptionExperencied = 0x17 ,
449 oC_Tcp_OptionKind_Snap = 0x18 ,
450 oC_Tcp_OptionKind_TcpCompressionFilter = 0x1A ,
451 oC_Tcp_OptionKind_QuickStartResponse = 0x1B ,
452 oC_Tcp_OptionKind_UserTimeout = 0x1C ,
453 oC_Tcp_OptionKind_TcpAuthentication = 0x1D ,
454 oC_Tcp_OptionKind_MultipathTcp = 0x1E ,
455 oC_Tcp_OptionKind_FastOpenCookie = 0x22 ,
456 oC_Tcp_OptionKind_Max = 0xFF ,
457 } oC_Tcp_OptionKind_t;
459 typedef void (*oC_Tcp_ConnectionFinishedFunction_t)(oC_Tcp_Connection_t Connection ,
void * Parameter );
463 uint32_t InitialSequenceNumber;
464 uint32_t InitialAcknowledgeNumber;
465 uint16_t LocalWindowSize;
466 uint8_t LocalWindowScale;
467 oC_Time_t ConfirmationTimeout;
468 oC_Time_t ExpirationTimeout;
469 oC_Time_t SendingAcknowledgeTimeout;
470 oC_Time_t ReadSegmentTimeout;
471 oC_Time_t ReceiveTimeout;
474 oC_MemorySize_t PacketSize;
480 #undef _________________________________________TYPES_SECTION______________________________________________________________________________ 487 #define _________________________________________FUNCTIONS_SECTION__________________________________________________________________________ 502 extern oC_ErrorCode_t
oC_Tcp_Disconnect ( oC_Tcp_Connection_t * Connection , oC_Time_t Timeout );
504 extern oC_ErrorCode_t
oC_Tcp_StopListen ( oC_Tcp_Server_t * Server , oC_Time_t Timeout );
505 extern oC_ErrorCode_t
oC_Tcp_Accept ( oC_Tcp_Server_t Server , oC_Tcp_Connection_t * outConnection , oC_Time_t Timeout );
506 extern oC_ErrorCode_t
oC_Tcp_Send ( oC_Tcp_Connection_t Connection,
const void * Buffer, oC_MemorySize_t Size, oC_Time_t Timeout );
507 extern oC_ErrorCode_t
oC_Tcp_Receive ( oC_Tcp_Connection_t Connection,
void * outBuffer, oC_MemorySize_t Size, oC_Time_t Timeout );
542 extern bool oC_Tcp_Connection_Delete ( oC_Tcp_Connection_t * Connection , oC_Time_t Timeout );
543 extern bool oC_Tcp_Connection_AreTheSame ( oC_Tcp_Connection_t ConnectionA, oC_Tcp_Connection_t ConnectionB );
544 extern bool oC_Tcp_Connection_IsCorrect ( oC_Tcp_Connection_t Connection );
545 extern oC_Thread_t oC_Tcp_Connection_GetThread ( oC_Tcp_Connection_t Connection );
546 extern bool oC_Tcp_Connection_IsConnected ( oC_Tcp_Connection_t Connection );
547 extern oC_Process_t oC_Tcp_Connection_GetProcess ( oC_Tcp_Connection_t Connection );
548 extern const char * oC_Tcp_Connection_GetName ( oC_Tcp_Connection_t Connection );
549 extern oC_ErrorCode_t oC_Tcp_Connection_Connect ( oC_Tcp_Connection_t Connection , oC_Time_t Timeout );
550 extern oC_ErrorCode_t oC_Tcp_Connection_Disconnect ( oC_Tcp_Connection_t Connection , oC_Time_t Timeout );
551 extern oC_ErrorCode_t oC_Tcp_Connection_WaitForConnection ( oC_Tcp_Connection_t Connection , oC_Time_t Timeout );
552 extern oC_ErrorCode_t oC_Tcp_Connection_Accept ( oC_Tcp_Connection_t Connection , oC_Time_t Timeout );
553 extern oC_ErrorCode_t oC_Tcp_Connection_Reject ( oC_Tcp_Connection_t Connection , oC_Time_t Timeout );
554 extern oC_ErrorCode_t oC_Tcp_Connection_ReadRemote ( oC_Tcp_Connection_t Connection ,
oC_Net_Address_t * outAddress );
555 extern oC_ErrorCode_t oC_Tcp_Connection_ReadLocal ( oC_Tcp_Connection_t Connection ,
oC_Net_Address_t * outAddress );
556 extern oC_ErrorCode_t oC_Tcp_Connection_Send ( oC_Tcp_Connection_t Connection ,
const void * Buffer , oC_MemorySize_t Size , oC_Time_t Timeout );
557 extern oC_ErrorCode_t oC_Tcp_Connection_Receive ( oC_Tcp_Connection_t Connection ,
void * outBuffer , oC_MemorySize_t Size , oC_Time_t Timeout );
560 #undef _________________________________________FUNCTIONS_SECTION__________________________________________________________________________ Previously netstat service.
SNMP multiplexing protocol.
Remote Mail Checking Protocol.
bool oC_Tcp_Packet_AddOption(oC_Tcp_Packet_t *Packet, oC_Tcp_OptionKind_t OptionKind, const void *Data, uint8_t Size)
Adds TCP option to the packet.
Microsoft EPMAP , also known as DCE/RPC Locator service, used to remotely manage services including D...
BIND remote name daemon control.
oC_ErrorCode_t oC_Tcp_StopListen(oC_Tcp_Server_t *Server, oC_Time_t Timeout)
stops listen at the given TCP port
Uninterruptible power supply.
PKIX Time Stamp Protocol.
HTTP RPC Ep Map, Remote procedure call over Hypertext Transfer Protocol, often used by Distributed Co...
Digital Imaging and Communications in Medicine.
oC_Tcp_Server_t oC_Tcp_Server_New(const oC_Net_Address_t *ListenAddress, uint32_t MaxConnections)
creates TCP server
NETCONF for SOAP over BEEP.
Simple Network Paging Protocol , RFC 1568.
Bootstrap Protocol client; also used by Dynamic Host Configuration Protocol.
Formerly Unisys Unitary Login, renamed by Unisys to NXEdit.
TACACS+ Login Host protocol.
FileMaker 6.0 Web Sharing.
File Transfer Protocol data transfer.
oC_Process_t oC_Tcp_Server_GetProcess(oC_Tcp_Server_t Server)
returns process associated with the server
kerberos_master, Kerberos authentication
Authenticated SMTP over TLS/SSL.
IBM Endpoint Manager Remote Control.
oC_ErrorCode_t oC_Tcp_Server_Run(oC_Tcp_Server_t Server)
starts the TCP server
FirstClass Protocol , used by FirstClass client/server groupware system.
Structured Query Language Service.
Hypertext Transfer Protocol.
Registry Registrar Protocol.
Kerberos Change/Set password.
Ident, authentication service/identification protocol, used by IRC servers to identify users...
Post Office Protocol, version 3.
bool oC_Tcp_Packet_ConvertToNetworkEndianess(oC_Tcp_Packet_t *Packet)
converts packet to network endianess
stores TCP connection data
bool oC_Tcp_Server_ContainsConnection(oC_Tcp_Server_t Server, oC_Tcp_Connection_t Connection)
checks if the server contains the connection
Citadel, multiservice protocol for dedicated clients for the Citadel groupware system.
rsync file synchronization protocol
SpamAssassin spamd daemon.
TUNNEL profile, a protocol for BEEP peers to form an application layer tunnel.
Character Generator Protocol.
NNSP, part of Network News Transfer Protocol.
Any private terminal access.
OSIsoft PI , OSISoft PI Server Client Access.
Certificate Management Protocol.
NETCONF for SOAP over HTTPS.
SupportSoft Nexus Remote Command , a proxy gateway connecting remote control traffic.
Remote HTTPS management for firewall devices running embedded Check Point VPN-1 software.
A Remote Network Server System.
oC_ErrorCode_t oC_Tcp_Server_RemoveConnection(oC_Tcp_Server_t Server, oC_Tcp_Connection_t Connection)
removes connection from server's connections list
oC_ErrorCode_t oC_Tcp_Server_AcceptConnection(oC_Tcp_Server_t Server, oC_Tcp_Connection_t Connection, oC_Time_t Timeout)
accepts TCP connection
Post Office Protocol 3 over TLS/SSL.
bool oC_Tcp_Packet_ConvertFromNetworkEndianess(oC_Tcp_Packet_t *Packet)
converts packet from network endianess
Lightweight Directory Access Protocol.
cddbp, CD DataBase protocol
Message posting protocol.
oC_ErrorCode_t oC_Tcp_TurnOn(oC_Time_t Timeout)
turns on TCP module
bool oC_Tcp_Server_IsRunning(oC_Tcp_Server_t Server)
checks if the TCP server is already running
Configuration of the debug functions.
Internet Message Access Protocol , management of electronic mail messages on a server.
Application Configuration Access Protocol.
oC_Tcp_Connection_t oC_Tcp_Connection_New(const oC_Tcp_Connection_Config_t *Config)
allocates memory for a new TCP connection object
Post Office Protocol, version 2.
Bootstrap Protocol server; also used by Dynamic Host Configuration Protocol.
oC_ErrorCode_t oC_Tcp_Disconnect(oC_Tcp_Connection_t *Connection, oC_Time_t Timeout)
disconnects TCP connection
Any private Remote job entry.
Topology Broadcast based on Reverse-Path Forwarding routing protocol.
Trivial File Transfer Protocol.
uint16_t oC_Tcp_Packet_CalculateChecksum(oC_Tcp_Packet_t *Packet)
calculates checksum for TCP packet
oC_Tcp_Packet_t * oC_Tcp_Packet_New(const oC_Net_Address_t *Source, const oC_Net_Address_t *Destination, uint16_t HeaderSize, const void *Data, uint16_t Size)
Allocates memory for a TCP packet.
Velneo Application Transfer Protocol.
Linux-HA high-availability heartbeat.
oC_Tcp_Port_t
stores TCP port
The library with time definitions.
Internet Security Association and Key Management Protocol / Internet Key Exchange.
Distributed Mail System Protocol.
Telnet protocol over TLS/SSL.
Hypertext Transfer Protocol over TLS/SSL.
oC_ErrorCode_t oC_Tcp_ReservePort(oC_Tcp_Port_t *Port, oC_Time_t Timeout)
reserves TCP port
oC_Process_t Process
Process assiociated with the server.
struct Tcp_Connection_t * oC_Tcp_Connection_t
stores TCP connection data
ScimoreDB Database System.
Well known Slither.io port.
FTPS Protocol , FTP over TLS/SSL.
oC_ErrorCode_t oC_Tcp_Accept(oC_Tcp_Server_t Server, oC_Tcp_Connection_t *outConnection, oC_Time_t Timeout)
waits for new connection and accepts it
bool oC_Tcp_IsPortReservedBy(oC_Tcp_Port_t Port, oC_Process_t Process)
checks if the port is reserved by the given process
Telnet protocol—unencrypted text communications.
Digital Equipment Corporation DECnet over TCP/IP.
struct Server_t * oC_Tcp_Server_t
stores TCP server object data
Mac OS X Server administration, version 10.4 and earlier.
Xerox Network Systems clearinghouse.
Label Distribution Protocol , a routing protocol used in MPLS networks.
NetBIOS Datagram Service.
ISO Transport Service Access Point Class 0 protocol;.
airserv-ng, aircrack-ng's server for remote-controlling wireless devices
bool oC_Tcp_IsPortReserved(oC_Tcp_Port_t Port)
checks if the port is reserved
oC_ErrorCode_t oC_Tcp_Server_AddConnection(oC_Tcp_Server_t Server, oC_Tcp_Connection_t Connection, oC_Time_t Timeout)
adds connection to server's connections list
Internet Printing Protocol.
uint32_t MaxConnections
Maximum number of connections that server can handle.
Rexec, Remote Process Execution.
bool oC_Tcp_Packet_ClearOptions(oC_Tcp_Packet_t *Packet)
clears options in the TCP packet
oC_ErrorCode_t oC_Tcp_Server_WaitForConnection(oC_Tcp_Server_t Server, oC_Tcp_Connection_t *outConnection, oC_Time_t Timeout)
Waits for new TCP connection.
Host Name Server Protocol.
Line Printer Daemon , print service.
Internet Message Access Protocol , version 3.
oC_ErrorCode_t oC_Tcp_CloseProcess(oC_Process_t Process, oC_Time_t Timeout)
closes all objects related with the process
Simple Network Management Protocol Trap.
Internet Relay Chat over TLS/SSL.
Efficient Short Remote Operations.
Microsoft-DS Active Directory, Windows shares.
void * ConnectionFinishedParameter
Parameter to give to the connection finished function.
void oC_Tcp_Packet_SetSize(oC_Tcp_Packet_t *Packet, uint16_t Size)
sets size of the TCP packet
Remote Shell, used to execute non-interactive commands on a remote system.
MSDP, Multicast Source Discovery Protocol.
Lightweight Directory Access Protocol over TLS/SSL.
Xerox Network Systems authentication.
krbupdate , Kerberos registration
Resource Location Protocol —used for determining the location of higher level services from hosts on...
Conserver serial-console management server.
Special value for marks port as not filled.
oC_Tcp_Port_t oC_Tcp_Server_GetPort(oC_Tcp_Server_t Server)
returns local port of the server
Extensible Provisioning Protocol , a protocol for communication between domain name registries and re...
oC_ErrorCode_t oC_Tcp_Packet_ReadData(oC_Tcp_Packet_t *Packet, void *outData, oC_MemorySize_t Size)
reads data of the TCP packet
GO-Global remote access and application publishing software.
Secure Shell , secure logins, file transfers and port forwarding.
Simple Network Management Protocol.
krb5_prop, Kerberos v5 slave propagation
Common Unix Printing System administration console.
Xerox Network Systems Mail.
efs, extended file name server
Quick Mail Transfer Protocol.
Group Domain Of Interpretation protocol.
Background File Transfer Program.
Mapping of Airline Traffic over Internet Protocol type A.
NetBIOS Name Service, used for name registration and resolution.
oC_ErrorCode_t oC_Tcp_Server_SetConnectionConfig(oC_Tcp_Server_t Server, const oC_Tcp_Connection_Config_t *Config)
sets connection configuration
uint8_t Data[IPv4_MAXIMUM_DATA_LENGTH]
Data of the packet.
Network News Transfer Protocol , retrieval of newsgroup messages.
dnsix Securit Attribute Token Map
bool oC_Tcp_Server_IsCorrect(oC_Tcp_Server_t Server)
checks if the TCP server object is correct
oC_Net_Ipv6_t Source
Source IP address.
Remotefs, RFS, rfs_server.
oC_ErrorCode_t oC_Tcp_Packet_SetData(oC_Tcp_Packet_t *Packet, const void *Data, uint16_t Size)
sets data in the TCP packet
kshell, Kerberos Remote shell
oC_ErrorCode_t oC_Tcp_Send(oC_Tcp_Connection_t Connection, const void *Buffer, oC_MemorySize_t Size, oC_Time_t Timeout)
sends data by using TCP connection
File Transfer Protocol control.
uint32_t Checksum
Header checksum - number used for errors detection.
oC_ErrorCode_t oC_Tcp_Server_Stop(oC_Tcp_Server_t Server)
stops the TCP server
Apple Filing Protocol over TCP.
Service Location Protocol.
FTPS Protocol , FTP over TLS/SSL.
Structured Query Language Services.
oC_Tcp_Header_t * oC_Tcp_Packet_GetHeaderReference(oC_Tcp_Packet_t *Packet)
returns TCP header reference
IBM Systems Network Architecture gateway access server.
The file with interface for process mechanism.
SupportSoft Nexus Remote Command , a proxy gateway connecting remote control traffic.
AppleTalk Routing Maintenance.
Link Management Protocol , a protocol that runs between a pair of nodes and is used to manage traffic...
Simple Gateway Monitoring Protocol , a protocol for remote inspection and alteration of gateway manag...
Border Gateway Protocol , used to exchange routing and reachability information among autonomous syst...
codaauth2, Coda authentication server
Internetwork Packet Exchange.
Reliable Syslog Service — used for system logging.
oC_ErrorCode_t oC_Tcp_Listen(const oC_Net_Address_t *Source, oC_Tcp_Server_t *outServer, uint32_t MaxConnections, oC_Time_t Timeout)
starts a server that listen at the given address
Media Management System Media Management Protocol.
Remote User Telnet Service.
oC_ErrorCode_t oC_Tcp_Connect(const oC_Net_Address_t *Destination, oC_Tcp_Port_t LocalPort, oC_Tcp_Connection_t *outConnection, oC_Time_t Timeout)
connects to the remote TCP server
Microsoft Windows SBS SharePoint.
URL Rendezvous Directory for SSM.
Previously Interface Message Processor logical address management.
Border Gateway Multicast Protocol.
oC_ErrorCode_t oC_Tcp_Packet_ReadOption(oC_Tcp_Packet_t *Packet, oC_Tcp_OptionKind_t OptionKind, void *outData, uint8_t *Size)
reads option from the TCP packet
File with interface for the NET module.
oC_ErrorCode_t oC_Tcp_ReleasePort(oC_Tcp_Port_t Port, oC_Time_t Timeout)
releases TCP port
Microsoft-DS SMB file sharing.
Simple Mail Transfer Protocol , used for e-mail routing between mail servers.
Internet Message Access Protocol over TLS/SSL.
void * oC_Tcp_Packet_GetDataReference(oC_Tcp_Packet_t *Packet)
returns pointer to the data inside the packet
Xerox Network Systems Time Protocol.
X Display Manager Control Protocol , used for remote logins to an X Display Manager server...
oC_ErrorCode_t oC_Tcp_Server_SetConnectionFinished(oC_Tcp_Server_t Server, oC_Tcp_ConnectionFinishedFunction_t Function, void *Parameter)
sets a pointer for 'connection finished function'
uint16_t oC_Tcp_Packet_GetDataSize(oC_Tcp_Packet_t *Packet)
returns size of data section inside TCP packet
Simple File Transfer Protocol.
Secure Internet Live Conferencing.
oC_ErrorCode_t oC_Tcp_TurnOff(oC_Time_t Timeout)
turns off TCP module
Cisco Tag Distribution Protocol—being replaced by the MPLS Label Distribution Protocol.
IEEE Media Management System over SSL.
IBM RMC protocol, used by System p5 AIX Integrated Virtualization Manager and Hardware Management Con...
bool oC_Tcp_Packet_Delete(oC_Tcp_Packet_t **outPacket)
releases memory allocated for a packet
ThinLinc web-based administration interface.
Network Time Protocol , used for time synchronization.
Unix-to-Unix Copy Protocol.
oC_ErrorCode_t oC_Tcp_Receive(oC_Tcp_Connection_t Connection, void *outBuffer, oC_MemorySize_t Size, oC_Time_t Timeout)
receives data by using TCP connection
NetWare Core Protocol is used for a variety things such as access to primary NetWare server resources...
Any private dial out service.
tcpnethaspsrv, Aladdin Knowledge Systems Hasp services
Kerberos authentication system.
oC_ErrorCode_t oC_Tcp_Server_RejectConnection(oC_Tcp_Server_t Server, oC_Tcp_Connection_t Connection, oC_Time_t Timeout)
rejects TCP connection
oC_Net_Ipv6_t Destination
Destination IP address.
ConnFinishedFunction_t ConnectionFinishedFunction
Pointer to the function to call when the connection has finished.
bool oC_Tcp_Server_Delete(oC_Tcp_Server_t *Server, oC_Time_t Timeout)
deletes TCP server
uint32_t Flags
Flags of the message, look at oC_Dhcp_Flags_t type for more.
Open Network Computing Remote Procedure Call.
Doom, first online first-person shooter.
e-mail message submission
Real Time Streaming Protocol.
Netnews Administration System.