diff options
author | João Sousa <48479050+joaodasousa@users.noreply.github.com> | 2020-08-31 00:56:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-31 08:56:03 +0900 |
commit | 33fbad18c814e13bd7ba2053525d8959fee437d1 (patch) | |
tree | 87d30704e5e78c603aace4cb2c0dacdf3554eba6 /include/dlt/dlt_client.h | |
parent | 9af27899553dcfe9cd5ffede7f37be57d1a577a6 (diff) | |
download | DLT-daemon-33fbad18c814e13bd7ba2053525d8959fee437d1.tar.gz |
Implement DLTClient for UDP multicast (#240)
* Add UDP multicast support on client side
UDP multicast support is already present on server side. This
patch add seemless support for UDP multicast on client side
in dlt-receive.
Signed-off-by: Joao Sousa <joao.sa.sousa@ctw.bmwgroup.com>
Diffstat (limited to 'include/dlt/dlt_client.h')
-rw-r--r-- | include/dlt/dlt_client.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/include/dlt/dlt_client.h b/include/dlt/dlt_client.h index 1fac86a..f649b83 100644 --- a/include/dlt/dlt_client.h +++ b/include/dlt/dlt_client.h @@ -81,14 +81,16 @@ typedef enum DLT_CLIENT_MODE_UNDEFINED = -1, DLT_CLIENT_MODE_TCP, DLT_CLIENT_MODE_SERIAL, - DLT_CLIENT_MODE_UNIX + DLT_CLIENT_MODE_UNIX, + DLT_CLIENT_MODE_UDP_MULTICAST } DltClientMode; typedef struct { DltReceiver receiver; /**< receiver pointer to dlt receiver structure */ int sock; /**< sock Connection handle/socket */ - char *servIP; /**< servIP IP adress/Hostname of TCP/IP interface */ + char *servIP; /**< servIP IP adress/Hostname of interface */ + char *hostip; /**< hostip IP address of UDP host receiver interface */ int port; /**< Port for TCP connections (optional) */ char *serialDevice; /**< serialDevice Devicename of serial device */ char *socketPath; /**< socketPath Unix socket path */ @@ -270,6 +272,14 @@ DltReturnValue dlt_client_send_reset_to_factory_default(DltClient *client); DltReturnValue dlt_client_setbaudrate(DltClient *client, int baudrate); /** + * Set mode within dlt client structure + * @param client pointer to dlt client structure + * @param mode DltClientMode + * @return Value from DltReturnValue enum + */ +DltReturnValue dlt_client_set_mode(DltClient *client, DltClientMode mode); + +/** * Set server ip * @param client pointer to dlt client structure * @param ipaddr pointer to command line argument @@ -278,6 +288,14 @@ DltReturnValue dlt_client_setbaudrate(DltClient *client, int baudrate); int dlt_client_set_server_ip(DltClient *client, char *ipaddr); /** + * Set server UDP host receiver interface address + * @param client pointer to dlt client structure + * @param hostip pointer to multicast group address + * @return negative value if there was an error + */ +int dlt_client_set_host_if_address(DltClient *client, char *hostip); + +/** * Set serial device * @param client pointer to dlt client structure * @param serial_device pointer to command line argument |