FireSync API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kPacketSocket.h
Go to the documentation of this file.
1 
8 #ifndef K_PACKET_SOCKET_H
9 #define K_PACKET_SOCKET_H
10 
11 #include <kApi/kApiDef.h>
12 #include <kFireSync/kFsDef.h>
13 
30 //typedef kObject kPacketSocket; --forward-declared in kFsDef.x.h
31 
47 kFsFx(kStatus) kPacketSocket_Construct(kPacketSocket* sockt, const kChar* adapterName, k16u* protocols, kSize protocolCount, kAlloc allocator);
48 
61 kFsFx(kStatus) kPacketSocket_ConstructEx(kPacketSocket* sockt, const kChar* adapterName, k16u* protocols, kSize protocolCount, kBool promiscuousMode, kAlloc allocator);
62 
74 kFsFx(kStatus) kPacketSocket_ConstructFromIp(kPacketSocket* sockt, kIpAddress ipAddress, k16u* protocols, kSize protocolCount, kAlloc allocator);
75 
88 kFsFx(kStatus) kPacketSocket_ConstructFromIpEx(kPacketSocket* sockt, kIpAddress ipAddress, k16u* protocols, kSize protocolCount, kBool promiscuousMode, kAlloc allocator);
89 
101 kFsFx(kStatus) kPacketSocket_Receive(kPacketSocket sockt, void* buffer, kSize size, kSize* bytesRead, k64u timeout);
102 
112 kFsFx(kStatus) kPacketSocket_Send(kPacketSocket sockt, const void* buffer, k32s size);
113 
124 kFsFx(kStatus) kPacketSocket_PrintPacket(const kByte* buffer, kSize size, kBool includeData, kString output);
125 
138 kFsFx(kStatus) kPacketSocket_AdapterInfo(kIpAddress ipAddress, kChar* adapterName, kSize capacity, kIpAddress* gateway, k32u* prefixlength, kMacAddress* macAddress);
139 
140 #include <kFireSync/Utils/kPacketSocket.x.h>
141 
142 #endif
kStatus kPacketSocket_ConstructEx(kPacketSocket *sockt, const kChar *adapterName, k16u *protocols, kSize protocolCount, kBool promiscuousMode, kAlloc allocator)
Constructs a kPacketSocket object with additional options.
kStatus kPacketSocket_Construct(kPacketSocket *sockt, const kChar *adapterName, k16u *protocols, kSize protocolCount, kAlloc allocator)
Constructs a kPacketSocket object (non-promiscuous mode).
kStatus kPacketSocket_ConstructFromIpEx(kPacketSocket *sockt, kIpAddress ipAddress, k16u *protocols, kSize protocolCount, kBool promiscuousMode, kAlloc allocator)
Constructs a kPacketSocket object from an Ip address with additional options.
kStatus kPacketSocket_ConstructFromIp(kPacketSocket *sockt, kIpAddress ipAddress, k16u *protocols, kSize protocolCount, kAlloc allocator)
Constructs a kPacketSocket object from an IP address (non-promiscuous mode).
kStatus kPacketSocket_AdapterInfo(kIpAddress ipAddress, kChar *adapterName, kSize capacity, kIpAddress *gateway, k32u *prefixlength, kMacAddress *macAddress)
Gives extended adapter information for a given Ip address.
Essential API declarations for the kFireSync library.
kStatus kPacketSocket_Receive(kPacketSocket sockt, void *buffer, kSize size, kSize *bytesRead, k64u timeout)
Reads up to the specified number of bytes from the socket.
kStatus kPacketSocket_Send(kPacketSocket sockt, const void *buffer, k32s size)
Sends the specified number of bytes.
Represents layer 2 functionality (sending and receiving of raw ethernet frames).
kStatus kPacketSocket_PrintPacket(const kByte *buffer, kSize size, kBool includeData, kString output)
Fills a string with the source and destination MAC address and hex presentation of the data...