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_common.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_common.h')
-rw-r--r-- | include/dlt/dlt_common.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/dlt/dlt_common.h b/include/dlt/dlt_common.h index 9f4096b..166395e 100644 --- a/include/dlt/dlt_common.h +++ b/include/dlt/dlt_common.h @@ -77,6 +77,7 @@ # include <stdio.h> # ifdef __linux__ # include <linux/limits.h> +# include <sys/socket.h> # else # include <limits.h> # endif @@ -402,6 +403,7 @@ enum { typedef enum { DLT_RECEIVE_SOCKET, + DLT_RECEIVE_UDP_SOCKET, DLT_RECEIVE_FD } DltReceiverType; @@ -767,11 +769,12 @@ typedef struct int32_t lastBytesRcvd; /**< bytes received in last receive call */ int32_t bytesRcvd; /**< received bytes */ int32_t totalBytesRcvd; /**< total number of received bytes */ - char *buffer; /**< pointer to receiver buffer */ - char *buf; /**< pointer to position within receiver buffer */ - char *backup_buf; /** pointer to the buffer with partial messages if any **/ - int fd; /**< connection handle */ + char *buffer; /**< pointer to receiver buffer */ + char *buf; /**< pointer to position within receiver buffer */ + char *backup_buf; /** pointer to the buffer with partial messages if any **/ + int fd; /**< connection handle */ int32_t buffersize; /**< size of receiver buffer */ + struct sockaddr_in addr; /**< socket address information */ } DltReceiver; typedef struct |