BALTECH SDK wrapper functions reference
eth.h
Go to the documentation of this file.
1 
10 #ifndef __BRP_BALTECH_SDK_CMDS_ETH_H__
11 #define __BRP_BALTECH_SDK_CMDS_ETH_H__
12 #include "../typedefs.h"
13 #ifdef BALTECH_SDK_INTERNAL
14 
17 #define BRP_Eth_ErrNoResultYet BRP_ERR_STATUS(0x4500, 0x01)
18 #endif // BALTECH_SDK_INTERNAL
19 #ifdef BALTECH_SDK_INTERNAL
20 
23 #define BRP_Eth_ErrNotConnected BRP_ERR_STATUS(0x4500, 0x02)
24 #endif // BALTECH_SDK_INTERNAL
25 #ifdef BALTECH_SDK_INTERNAL
26 
29 #define BRP_Eth_ErrDisabled BRP_ERR_STATUS(0x4500, 0x03)
30 #endif // BALTECH_SDK_INTERNAL
31 #ifdef BALTECH_SDK_INTERNAL
32 typedef struct {
33  brp_protocol protocol;
34  brp_buf* MAC;
35  brp_mempool *mempool;
36 } brp_Eth_GetMacAdr_t;
45 #ifdef BRP_SUPPORT_LEGACY_METHODS
46 brp_errcode brp_Eth_GetMacAdr(brp_protocol protocol, brp_buf* MAC, brp_mempool *mempool);
47 #else
48 brp_errcode brp_Eth_GetMacAdr(brp_Eth_GetMacAdr_t params);
49 #endif
50 typedef struct {
51  brp_protocol protocol;
52  brp_buf* IP;
53  brp_mempool *mempool;
54 } brp_Eth_GetConnDevIP_t;
63 #ifdef BRP_SUPPORT_LEGACY_METHODS
64 brp_errcode brp_Eth_GetConnDevIP(brp_protocol protocol, brp_buf* IP, brp_mempool *mempool);
65 #else
66 brp_errcode brp_Eth_GetConnDevIP(brp_Eth_GetConnDevIP_t params);
67 #endif
68 typedef struct {
69  brp_protocol protocol;
70 } brp_Eth_CreateRecoveryPoint_t;
77 #ifdef BRP_SUPPORT_LEGACY_METHODS
78 brp_errcode brp_Eth_CreateRecoveryPoint(brp_protocol protocol);
79 #else
80 brp_errcode brp_Eth_CreateRecoveryPoint(brp_Eth_CreateRecoveryPoint_t params);
81 #endif
82 typedef struct {
83  brp_protocol protocol;
84 } brp_Eth_DelRecoveryPoint_t;
91 #ifdef BRP_SUPPORT_LEGACY_METHODS
92 brp_errcode brp_Eth_DelRecoveryPoint(brp_protocol protocol);
93 #else
94 brp_errcode brp_Eth_DelRecoveryPoint(brp_Eth_DelRecoveryPoint_t params);
95 #endif
96 typedef struct {
97  brp_protocol protocol;
98  unsigned* PortStatus;
99  brp_buf* StaticIPAdr;
100  brp_buf* StaticIPNetmask;
101  brp_buf* StaticIPGateway;
102  brp_buf* DHCPAdr;
103  brp_buf* DHCPNetmask;
104  brp_buf* DHCPGateway;
105  brp_buf* LinkLocalAdr;
106  brp_buf* LinkLocalNetmask;
107  brp_buf* LinkLocalGateway;
108  brp_buf* DNSAdr;
109  brp_buf* HostAdr;
110  unsigned* HostPort;
111  unsigned* AutocloseTimeout;
112  brp_mempool *mempool;
113 } brp_Eth_GetNetworkStatus_t;
135 #ifdef BRP_SUPPORT_LEGACY_METHODS
136 brp_errcode brp_Eth_GetNetworkStatus(brp_protocol protocol, unsigned* PortStatus, brp_buf* StaticIPAdr, brp_buf* StaticIPNetmask, brp_buf* StaticIPGateway, brp_buf* DHCPAdr, brp_buf* DHCPNetmask, brp_buf* DHCPGateway, brp_buf* LinkLocalAdr, brp_buf* LinkLocalNetmask, brp_buf* LinkLocalGateway, brp_buf* DNSAdr, brp_buf* HostAdr, unsigned* HostPort, unsigned* AutocloseTimeout, brp_mempool *mempool);
137 #else
138 brp_errcode brp_Eth_GetNetworkStatus(brp_Eth_GetNetworkStatus_t params);
139 #endif
140 typedef struct {
141  brp_protocol protocol;
142  unsigned Port;
143  unsigned** MIBCounterList;
144  size_t* MIBCounterList_len;
145  brp_mempool *mempool;
146 } brp_Eth_GetMIBCounters_t;
157 #ifdef BRP_SUPPORT_LEGACY_METHODS
158 brp_errcode brp_Eth_GetMIBCounters(brp_protocol protocol, unsigned _input_Port, unsigned** MIBCounterList, size_t* MIBCounterList_len, brp_mempool *mempool);
159 #else
160 brp_errcode brp_Eth_GetMIBCounters(brp_Eth_GetMIBCounters_t params);
161 #endif
162 typedef struct {
163  brp_protocol protocol;
164  brp_Eth_GetTcpConnectionStatus_Status* Status;
165 } brp_Eth_GetTcpConnectionStatus_t;
173 #ifdef BRP_SUPPORT_LEGACY_METHODS
174 brp_errcode brp_Eth_GetTcpConnectionStatus(brp_protocol protocol, brp_Eth_GetTcpConnectionStatus_Status* Status);
175 #else
176 brp_errcode brp_Eth_GetTcpConnectionStatus(brp_Eth_GetTcpConnectionStatus_t params);
177 #endif
178 typedef struct {
179  brp_protocol protocol;
180  brp_Eth_OpenTcpConnection_ConnectionReason ConnectionReason;
181 } brp_Eth_OpenTcpConnection_t;
189 #ifdef BRP_SUPPORT_LEGACY_METHODS
190 brp_errcode brp_Eth_OpenTcpConnection(brp_protocol protocol, brp_Eth_OpenTcpConnection_ConnectionReason _input_ConnectionReason);
191 #else
192 brp_errcode brp_Eth_OpenTcpConnection(brp_Eth_OpenTcpConnection_t params);
193 #endif
194 typedef struct {
195  brp_protocol protocol;
196 } brp_Eth_CloseTcpConnection_t;
203 #ifdef BRP_SUPPORT_LEGACY_METHODS
204 brp_errcode brp_Eth_CloseTcpConnection(brp_protocol protocol);
205 #else
206 brp_errcode brp_Eth_CloseTcpConnection(brp_Eth_CloseTcpConnection_t params);
207 #endif
208 #endif // BALTECH_SDK_INTERNAL
209 #endif
210 
unsigned int brp_errcode
This type is used library-wide for passing error codes in the return value of functions.
Definition: errorcodes.h:23
struct brp_protocol_t * brp_protocol
This is a generic handle of a protocol.
Definition: protocol.h:34
struct brp_mempool_object_t * brp_mempool
mempool handle.
Definition: mempool.h:29
unsigned char * brp_buf
represents a pointer to a protocol data buffer.
Definition: common.h:61