24 #ifndef __NETWORK_INTERFACE_H_
25 #define __NETWORK_INTERFACE_H_
137 #endif //__NETWORK_INTERFACE_H_
int iot_tls_init(Network *pNetwork)
Initialize the TLS implementation.
Definition: network_mbedtls_wrapper.c:66
char * pDestinationURL
Pointer to string containing the endpoint of the MQTT service.
Definition: network_interface.h:44
int(* destroy)(Network *)
Function pointer pointing to the network function to destroy the network object.
Definition: network_interface.h:62
int iot_tls_connect(Network *pNetwork, TLSConnectParams TLSParams)
Create a TLS socket and open the connection.
Definition: network_mbedtls_wrapper.c:103
int(* mqttread)(Network *, unsigned char *, int, int)
Function pointer pointing to the network function to read from the network.
Definition: network_interface.h:58
int iot_tls_destroy(Network *pNetwork)
Perform any tear-down or cleanup of TLS layer.
Definition: network_mbedtls_wrapper.c:268
TLS Connection Parameters.
Definition: network_interface.h:40
int DestinationPort
Integer defining the connection port of the MQTT service.
Definition: network_interface.h:45
unsigned int timeout_ms
Unsigned integer defining the TLS handshake timeout value in milliseconds.
Definition: network_interface.h:46
int iot_tls_read(Network *, unsigned char *, int, int)
Read bytes from the network socket.
Definition: network_mbedtls_wrapper.c:240
Network Structure.
Definition: network_interface.h:55
void(* disconnect)(Network *)
Function pointer pointing to the network function to disconnect from the network. ...
Definition: network_interface.h:60
int my_socket
Integer holding the socket file descriptor.
Definition: network_interface.h:56
int(* isConnected)(Network *)
Function pointer pointing to the network function to check if physical layer is connected.
Definition: network_interface.h:61
char * pDevicePrivateKeyLocation
Pointer to string containing the filename (including path) of the device private key file...
Definition: network_interface.h:43
char * pRootCALocation
Pointer to string containing the filename (including path) of the root CA file.
Definition: network_interface.h:41
unsigned char ServerVerificationFlag
Boolean. True = perform server certificate hostname validation. False = skip validation NOT recommend...
Definition: network_interface.h:47
char * pDeviceCertLocation
Pointer to string containing the filename (including path) of the device certificate.
Definition: network_interface.h:42
int iot_tls_write(Network *, unsigned char *, int, int)
Write bytes to the network socket.
Definition: network_mbedtls_wrapper.c:224
int iot_tls_is_connected(Network *pNetwork)
Check if TLS layer is still connected.
Definition: network_mbedtls_wrapper.c:98
int(* mqttwrite)(Network *, unsigned char *, int, int)
Function pointer pointing to the network function to write to the network.
Definition: network_interface.h:59
void iot_tls_disconnect(Network *pNetwork)
Disconnect from network socket.
Definition: network_mbedtls_wrapper.c:262