diff options
| author | liuwentan <[email protected]> | 2022-08-11 10:50:41 +0800 |
|---|---|---|
| committer | liuwentan <[email protected]> | 2022-08-11 10:50:41 +0800 |
| commit | 85c28ff17e37de4ac9489d79f2c87e63de156d87 (patch) | |
| tree | c8ffaa04ddf0784735447ec822570cd712f3f74f /src/packet_io | |
| parent | 14703ec4b44f708001f19bbe326e03a29346df0c (diff) | |
[CIFIX]add extern 'C' in C++ code
Diffstat (limited to 'src/packet_io')
| -rw-r--r-- | src/packet_io/marsio_mode/pio_marsio.h | 17 | ||||
| -rw-r--r-- | src/packet_io/packet_io.h | 16 | ||||
| -rw-r--r-- | src/packet_io/pcap_file_mode/pio_pcap_file.h | 16 | ||||
| -rw-r--r-- | src/packet_io/pcap_live_mode/pio_pcap_live.h | 16 |
4 files changed, 56 insertions, 9 deletions
diff --git a/src/packet_io/marsio_mode/pio_marsio.h b/src/packet_io/marsio_mode/pio_marsio.h index 1b40bc4..0a81ff7 100644 --- a/src/packet_io/marsio_mode/pio_marsio.h +++ b/src/packet_io/marsio_mode/pio_marsio.h @@ -8,10 +8,15 @@ *********************************************************************************************** */ -#pragma once +#ifndef _PIO_MARSIO_H_ +#define _PIO_MARSIO_H_ -#include <stdint.h> +#ifdef __cpluscplus +extern "C" +{ +#endif +#include <stdint.h> #include <marsio.h> /** @@ -166,4 +171,10 @@ char *pio_marsio_device_buff_mtod(struct stellar_packet *p); uint32_t pio_marsio_device_buff_buflen(struct stellar_packet *p); -uint32_t pio_marsio_device_buff_datalen(struct stellar_packet *p);
\ No newline at end of file +uint32_t pio_marsio_device_buff_datalen(struct stellar_packet *p); + +#ifdef __cpluscplus +} +#endif + +#endif /* _PIO_MARSIO_H_ */
\ No newline at end of file diff --git a/src/packet_io/packet_io.h b/src/packet_io/packet_io.h index 0cd0936..1e70df8 100644 --- a/src/packet_io/packet_io.h +++ b/src/packet_io/packet_io.h @@ -8,7 +8,13 @@ *********************************************************************************************** */ -#pragma once +#ifndef _PACKET_IO_H_ +#define _PACKET_IO_H_ + +#ifdef __cpluscplus +extern "C" +{ +#endif #include <stdint.h> #include <limits.h> @@ -169,4 +175,10 @@ uint32_t packet_io_buff_buflen(struct packet_io_device *pdev, struct stellar_pac /** * @brief get packet_io packet's data length */ -uint32_t packet_io_buff_datalen(struct packet_io_device *pdev, struct stellar_packet *p);
\ No newline at end of file +uint32_t packet_io_buff_datalen(struct packet_io_device *pdev, struct stellar_packet *p); + +#ifdef __cpluscplus +} +#endif + +#endif /* _PIO_PCAP_LIVE_H_ */
\ No newline at end of file diff --git a/src/packet_io/pcap_file_mode/pio_pcap_file.h b/src/packet_io/pcap_file_mode/pio_pcap_file.h index 69e20c3..1d5e327 100644 --- a/src/packet_io/pcap_file_mode/pio_pcap_file.h +++ b/src/packet_io/pcap_file_mode/pio_pcap_file.h @@ -8,7 +8,13 @@ *********************************************************************************************** */ -#pragma once +#ifndef _PIO_PCAP_FILE_H_ +#define _PIO_PCAP_FILE_H_ + +#ifdef __cpluscplus +extern "C" +{ +#endif #include <stdint.h> #include <dirent.h> @@ -137,4 +143,10 @@ char *pio_pcap_file_device_buff_mtod(struct stellar_packet *p); uint32_t pio_pcap_file_device_buff_buflen(struct stellar_packet *p); -uint32_t pio_pcap_file_device_buff_datalen(struct stellar_packet *p);
\ No newline at end of file +uint32_t pio_pcap_file_device_buff_datalen(struct stellar_packet *p); + +#ifdef __cpluscplus +} +#endif + +#endif /* _PIO_PCAP_FILE_H_ */
\ No newline at end of file diff --git a/src/packet_io/pcap_live_mode/pio_pcap_live.h b/src/packet_io/pcap_live_mode/pio_pcap_live.h index c60d5a2..85b6554 100644 --- a/src/packet_io/pcap_live_mode/pio_pcap_live.h +++ b/src/packet_io/pcap_live_mode/pio_pcap_live.h @@ -8,7 +8,13 @@ *********************************************************************************************** */ -#pragma once +#ifndef _PIO_PCAP_LIVE_H_ +#define _PIO_PCAP_LIVE_H_ + +#ifdef __cpluscplus +extern "C" +{ +#endif #include <stdint.h> #include <pcap/pcap.h> @@ -99,4 +105,10 @@ char *pio_pcap_live_device_buff_mtod(struct stellar_packet *p); uint32_t pio_pcap_live_device_buff_buflen(struct stellar_packet *p); -uint32_t pio_pcap_live_device_buff_datalen(struct stellar_packet *p);
\ No newline at end of file +uint32_t pio_pcap_live_device_buff_datalen(struct stellar_packet *p); + +#ifdef __cpluscplus +} +#endif + +#endif /* _PIO_PCAP_LIVE_H_ */
\ No newline at end of file |
