mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
c++: sys: add extern C to header files
This commit is contained in:
parent
7830c86d45
commit
de3c3cebd0
@ -32,7 +32,15 @@
|
||||
#ifndef AUTO_INIT_H
|
||||
#define AUTO_INIT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void auto_init(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif /* AUTO_INIT_H */
|
||||
|
@ -127,6 +127,10 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* hashfp_t hash function to use in thee filter
|
||||
*/
|
||||
@ -215,5 +219,9 @@ void bloom_add(bloom_t *bloom, const uint8_t *buf, size_t len);
|
||||
*/
|
||||
bool bloom_check(bloom_t *bloom, const uint8_t *buf, size_t len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif /* _BLOOM_FILTER_H */
|
||||
|
@ -23,6 +23,10 @@
|
||||
#include "kernel_types.h"
|
||||
#include "cpu-conf.h" /* To give user access to UART0_BUFSIZE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern kernel_pid_t uart0_handler_pid;
|
||||
|
||||
void board_uart0_init(void);
|
||||
@ -32,5 +36,9 @@ void uart0_notify_thread(void);
|
||||
int uart0_readc(void);
|
||||
void uart0_putc(int c);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif /* __BOARD_UART0_H */
|
||||
|
@ -99,10 +99,15 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef CBOR_NO_CTIME
|
||||
#include <time.h>
|
||||
#endif /* CBOR_NO_CTIME */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Struct containing CBOR-encoded data
|
||||
*
|
||||
@ -363,6 +368,10 @@ bool cbor_at_break(const cbor_stream_t *s, size_t offset);
|
||||
*/
|
||||
bool cbor_at_end(const cbor_stream_t *s, size_t offset);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
@ -18,7 +18,15 @@
|
||||
|
||||
#include "ringbuffer.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void chardev_loop(ringbuffer_t *rb);
|
||||
void *chardev_thread_entry(void *rb_);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __CHARDEV_THREAD_H */
|
||||
|
@ -23,6 +23,10 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Data-structure describing a RGB color
|
||||
*/
|
||||
@ -58,5 +62,9 @@ void color_rgb2hsv(color_rgb_t *rgb, color_hsv_t *hsv);
|
||||
*/
|
||||
void color_hsv2rgb(color_hsv_t *hsv, color_rgb_t *rgb);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __COLOR_H */
|
||||
/** @} */
|
||||
|
@ -29,6 +29,10 @@
|
||||
#ifndef THREEDES_H_
|
||||
#define THREEDES_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define THREEDES_BLOCK_SIZE 8
|
||||
#define THREEDES_KEY_SIZE PARSEC_KEYSIZE
|
||||
|
||||
@ -148,5 +152,9 @@ uint8_t tripledes_get_preferred_block_size(void);
|
||||
*/
|
||||
extern block_cipher_interface_t tripledes_interface;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif /* THREEDES_H_ */
|
||||
|
@ -29,6 +29,9 @@
|
||||
#include <stdint.h>
|
||||
#include "crypto/ciphers.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef uint32_t u32;
|
||||
typedef uint16_t u16;
|
||||
@ -138,5 +141,9 @@ uint8_t aes_get_preferred_block_size(void);
|
||||
*/
|
||||
extern block_cipher_interface_t aes_inerface;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif /* AES_H */
|
||||
|
@ -31,6 +31,10 @@
|
||||
|
||||
#include "crypto/ciphers.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MIN(a, b) ( ((a) < (b)) ? (a) : (b))
|
||||
|
||||
#define DBG_CRYPTO 1
|
||||
@ -204,5 +208,9 @@ int block_cipher_mode_decrypt(CipherModeContext *context,
|
||||
uint16_t num_bytes,
|
||||
uint8_t *IV);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif /* CBCMODE_H_ */
|
||||
|
@ -22,6 +22,10 @@
|
||||
#ifndef __CIPHERS_H_
|
||||
#define __CIPHERS_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Shared header file for all cipher algorithms */
|
||||
|
||||
/* Set the algorithms that should be compiled in here. When these defines
|
||||
@ -119,5 +123,9 @@ typedef struct {
|
||||
#endif
|
||||
} cipher_mac_context_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif /* __CIPHERS_H_ */
|
||||
|
@ -23,6 +23,9 @@
|
||||
#ifndef RC5_H_
|
||||
#define RC5_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define RC5_32_P 0xB7E15163L
|
||||
#define RC5_32_Q 0x9E3779B9L
|
||||
@ -137,5 +140,9 @@ uint8_t rc5_get_preferred_block_size(void);
|
||||
*/
|
||||
extern block_cipher_interface_t rc5_interface;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif /* RC5_H_ */
|
||||
|
@ -51,6 +51,10 @@
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SHA256_DIGEST_LENGTH 32
|
||||
|
||||
typedef struct {
|
||||
@ -96,5 +100,9 @@ void sha256_final(unsigned char digest[32], sha256_context_t *ctx);
|
||||
*/
|
||||
unsigned char *sha256(const unsigned char *d, size_t n, unsigned char *md);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif /* _SHA256_H_ */
|
||||
|
@ -23,6 +23,10 @@
|
||||
|
||||
#include "crypto/ciphers.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define F(addr) /*CRYPTO_TABLE_ACCESS( &SJ_F[addr])*/ (SJ_F[addr])
|
||||
|
||||
// G-Permutation: 4 round feistel structure
|
||||
@ -167,5 +171,9 @@ uint8_t skipjack_get_preferred_block_size(void);
|
||||
*/
|
||||
extern block_cipher_interface_t skipjack_interface;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif /* SKIPJACK_H_ */
|
||||
|
@ -28,6 +28,10 @@
|
||||
#ifndef TWOFISH_H_
|
||||
#define TWOFISH_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define TWOFISH_BLOCK_SIZE 16
|
||||
#define TWOFISH_KEY_SIZE 16 //only alternative is 32!
|
||||
|
||||
@ -278,5 +282,9 @@ uint8_t twofish_get_preferred_block_size(void);
|
||||
*/
|
||||
extern block_cipher_interface_t twofish_interface;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif /* TWOFISH_H_ */
|
||||
|
@ -25,6 +25,10 @@
|
||||
#include "kernel_types.h"
|
||||
#include "cpu.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* File descriptor table.
|
||||
*/
|
||||
@ -87,4 +91,8 @@ fd_t *fd_get(int fd);
|
||||
*/
|
||||
void fd_destroy(int fd);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FD_H */
|
||||
|
@ -9,7 +9,15 @@
|
||||
#ifndef __HASH_STRING_H
|
||||
#define __HASH_STRING_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
unsigned long hash_string(unsigned char *str);
|
||||
int cmp_string(char *a, char *b);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __HASH_STRING_H */
|
||||
|
@ -25,6 +25,10 @@
|
||||
#include <stddef.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief djb2_hash
|
||||
*
|
||||
@ -155,5 +159,9 @@ uint32_t rotating_hash(const uint8_t *buf, size_t len);
|
||||
*/
|
||||
uint32_t one_at_a_time_hash(const uint8_t *buf, size_t len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif /* __HASHES_H */
|
||||
|
@ -15,6 +15,10 @@
|
||||
|
||||
#include "radio/radio.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void init_payload(void);
|
||||
void ping_init(protocol_t protocol, uint8_t channr, radio_address_t addr);
|
||||
void ping(radio_address_t addr, uint8_t channr);
|
||||
@ -38,3 +42,7 @@ typedef struct pong {
|
||||
typedef struct ping_payload {
|
||||
char *payload;
|
||||
} ping_payload;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -38,6 +38,10 @@
|
||||
#include "ringbuffer.h"
|
||||
#include "thread.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef PIPE_BUF
|
||||
# define PIPE_BUF (128) /**< Size of a dynamically malloc'd pipe. */
|
||||
#endif
|
||||
@ -108,6 +112,10 @@ pipe_t *pipe_malloc(unsigned size);
|
||||
*/
|
||||
void pipe_free(pipe_t *rp);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/**
|
||||
* @}
|
||||
|
@ -22,6 +22,10 @@
|
||||
|
||||
#include "kernel_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define OPEN 0
|
||||
#define CLOSE 1
|
||||
#define READ 2
|
||||
@ -37,5 +41,9 @@ int posix_close(int pid);
|
||||
int posix_read(int pid, char *buffer, int bufsize);
|
||||
int posix_write(int pid, char *buffer, int bufsize);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif /* __READ_H */
|
||||
|
@ -16,7 +16,15 @@
|
||||
#ifndef __PS_H
|
||||
#define __PS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void thread_print_all(void);
|
||||
void _ps_handler(int argc, char **argv);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __PS_H */
|
||||
|
@ -37,6 +37,10 @@
|
||||
#include <stdbool.h>
|
||||
#include "radio/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define L1_PROTOCOL_CATCH_ALL (0xff) ///< Catch all protocol ID
|
||||
|
||||
enum layer_1_protocols {
|
||||
@ -72,6 +76,10 @@ typedef struct {
|
||||
void (*print_config)(void);
|
||||
} radio_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
||||
#endif /* RADIO_H_ */
|
||||
|
@ -30,6 +30,10 @@
|
||||
#include "board.h"
|
||||
#include "timex.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef uint8_t protocol_t; ///< Packet protocol type
|
||||
typedef uint16_t radio_address_t; ///< Radio layer address type
|
||||
|
||||
@ -97,4 +101,8 @@ typedef void (*packet_handler_t)(void *payload, int payload_size, packet_info_t
|
||||
*/
|
||||
typedef void (*packet_monitor_t)(void *payload, int payload_size, protocol_t protocol, packet_info_t *packet_info);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* COMMONTYPES_H_ */
|
||||
|
@ -15,6 +15,10 @@
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef PRNG_FLOAT
|
||||
# define PRNG_FLOAT (0)
|
||||
#endif
|
||||
@ -72,3 +76,7 @@ double genrand_real_exclusive(void);
|
||||
double genrand_res53(void);
|
||||
|
||||
#endif /* PRNG_FLOAT */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -19,6 +19,10 @@
|
||||
#ifndef __RINGBUFFER_H
|
||||
#define __RINGBUFFER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Ringbuffer.
|
||||
* @details Non thread-safe FIFO ringbuffer implementation around a `char` array.
|
||||
@ -146,4 +150,8 @@ int ringbuffer_peek_one(const ringbuffer_t *restrict rb);
|
||||
*/
|
||||
unsigned ringbuffer_peek(const ringbuffer_t *restrict rb, char *buf, unsigned n);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __RINGBUFFER_H */
|
||||
|
@ -19,6 +19,10 @@
|
||||
|
||||
#include "attributes.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Protype of a shell callback handler.
|
||||
* @details The functions supplied to shell_init() must use this signature.
|
||||
@ -84,4 +88,8 @@ void shell_init(shell_t *shell,
|
||||
*/
|
||||
void shell_run(shell_t *shell) NORETURN;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __SHELL_H */
|
||||
|
@ -11,6 +11,10 @@
|
||||
|
||||
#include "shell.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define DISK_GET_SECTOR_SIZE "dget_ssize"
|
||||
#define DISK_GET_SECTOR_COUNT "dget_scount"
|
||||
#define DISK_GET_BLOCK_SIZE "dget_bsize"
|
||||
@ -19,4 +23,8 @@
|
||||
|
||||
extern const shell_command_t _shell_command_list[];
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __SHELL_COMMANDS_H */
|
||||
|
@ -25,6 +25,10 @@
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// mspgcc bug : PRIxxx macros not defined before mid-2011 versions
|
||||
#ifndef PRIu32
|
||||
#define PRIu32 "lu"
|
||||
@ -164,5 +168,9 @@ static inline const char *timex_to_str(timex_t t, char *timestamp)
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif /* __TIMEX_H */
|
||||
|
@ -23,6 +23,10 @@
|
||||
|
||||
#include "attributes.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define TM_WDAY_SUN (0) /**< Sunday in `struct tm::tm_wday`. */
|
||||
#define TM_WDAY_MON (1) /**< Monday in `struct tm::tm_wday`. */
|
||||
#define TM_WDAY_TUE (2) /**< Tuesday in `struct tm::tm_wday`. */
|
||||
@ -110,4 +114,8 @@ int tm_is_valid_date(int year, int mon, int mday) CONST;
|
||||
*/
|
||||
int tm_is_valid_time(int hour, int min, int sec) CONST;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -77,6 +77,10 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Stack size for transceiver thread */
|
||||
#ifndef TRANSCEIVER_STACK_SIZE
|
||||
#define TRANSCEIVER_STACK_SIZE (KERNEL_CONF_STACKSIZE_DEFAULT)
|
||||
@ -247,5 +251,9 @@ uint8_t transceiver_register(transceiver_type_t transceivers, kernel_pid_t pid);
|
||||
*/
|
||||
uint8_t transceiver_unregister(transceiver_type_t transceivers, kernel_pid_t pid);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* TRANSCEIVER_H */
|
||||
/** @} */
|
||||
|
@ -28,6 +28,10 @@
|
||||
#include "timex.h"
|
||||
#include "msg.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MSG_TIMER 12345
|
||||
|
||||
/**
|
||||
@ -138,5 +142,9 @@ void vtimer_print_long_queue(void);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif /* __VTIMER_H */
|
||||
|
@ -54,6 +54,10 @@
|
||||
|
||||
#include "ccnl.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
typedef union {
|
||||
@ -290,5 +294,9 @@ void free_4ptr_list(void *a, void *b, void *c, void *d);
|
||||
void free_prefix(struct ccnl_prefix_s *p);
|
||||
void free_content(struct ccnl_content_s *c);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*CCNL_CORE_H__*/
|
||||
// eof
|
||||
|
@ -26,6 +26,10 @@
|
||||
#ifndef CCNL_EXT_H__
|
||||
#define CCNL_EXT_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define compute_ccnx_digest(buf) sha256(buf->data, buf->datalen, NULL)
|
||||
|
||||
#ifdef USE_FRAG
|
||||
@ -93,6 +97,10 @@ ccnl_prefix_clone_strip(struct ccnl_prefix_s *p, int strip);
|
||||
|
||||
char *ccnl_prefix_to_path(struct ccnl_prefix_s *pr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CCNL_EXT_H__ */
|
||||
|
||||
// eof
|
||||
|
@ -28,10 +28,18 @@
|
||||
|
||||
#include "crypto/sha256.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define RIOT_MSG_DEV (1)
|
||||
#define RIOT_TRANS_DEV (2)
|
||||
|
||||
#define RIOT_MSG_IDX (0)
|
||||
#define RIOT_TRANS_IDX (1)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
// eof
|
||||
|
@ -16,6 +16,10 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int dehead(unsigned char **buf, int *len, int *num, int *typ);
|
||||
int mkHeader(unsigned char *buf, unsigned int num, unsigned int tt);
|
||||
int mkBlob(unsigned char *out, unsigned int num, unsigned int tt, char *cp, int cnt);
|
||||
@ -26,3 +30,7 @@ int unmkBinaryInt(unsigned char **data, int *datalen, unsigned int *result,
|
||||
unsigned char *width);
|
||||
int mkInterest(char **namecomp, unsigned int *nonce, unsigned char *out);
|
||||
int mkContent(char **namecomp, char *data, int datalen, unsigned char *out);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -20,6 +20,10 @@
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// (ms) I moved the following struct def here because it is used by all
|
||||
// containers apart from the kernel (this way I don't need to redefine it
|
||||
// for omnet.
|
||||
@ -47,3 +51,7 @@ void
|
||||
ccnl_rem_timer(void *h);
|
||||
|
||||
extern struct ccnl_timer_s *eventqueue;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -18,6 +18,10 @@
|
||||
|
||||
#include "ccn_lite/ccnl-riot.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define RIOT_CCN_EVENT_NUMBER_OFFSET (1 << 8)
|
||||
|
||||
#define RIOT_BROADCAST (UINT16_MAX)
|
||||
@ -32,3 +36,7 @@ int riot_send_msg(uint8_t *buf, uint16_t size, uint16_t to);
|
||||
void riot_send_nack(uint16_t to);
|
||||
kernel_pid_t riot_start_helper_thread(void);
|
||||
char *riot_ccnl_event_to_string(int event);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -21,6 +21,10 @@
|
||||
* 2011-03-30 created
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define CCNL_MAX_INTERFACES 2 /* transceiver and msg interfaces */
|
||||
|
||||
#define CCNL_INTEREST_TIMEOUT_SEC 0
|
||||
@ -139,4 +143,8 @@
|
||||
// function alias for RIOTs debug infrastructure
|
||||
#define DEBUGMSG(LVL, ...) DEBUG(__VA_ARGS__)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
// eof
|
||||
|
@ -20,6 +20,10 @@
|
||||
* 2011-03-13 created
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#define CCN_DEFAULT_MTU PAYOAD_SIZE
|
||||
@ -69,4 +73,8 @@
|
||||
#define CCN_DTAG_SEQNO 256
|
||||
#define CCN_DTAG_CCNPDU 17702112
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
// eof
|
||||
|
@ -16,7 +16,15 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int mkNewFaceRequest(unsigned char *out, char *macsrc, char *ip4src,
|
||||
char *host, char *port, char *flags);
|
||||
|
||||
int mkPrefixregRequest(unsigned char *out, char reg, char *path, char *faceid);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -38,6 +38,10 @@
|
||||
|
||||
#include "transceiver.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define TRANSCEIVER TRANSCEIVER_DEFAULT
|
||||
|
||||
#define CCNL_DEFAULT_CHANNEL 6
|
||||
@ -82,6 +86,10 @@ void *ccnl_riot_relay_start(void *arg);
|
||||
*/
|
||||
void *ccnl_riot_appserver_start(void *arg);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -16,6 +16,10 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define RIOT_CCNL_POPULATE (1)
|
||||
|
||||
#if RIOT_CCNL_POPULATE
|
||||
@ -357,3 +361,7 @@ unsigned char text_txt_ccnb_9[] = {
|
||||
unsigned int text_txt_ccnb_9_len = 118;
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -27,6 +27,10 @@
|
||||
#ifndef CCNL_RIOT_CLIENT_H
|
||||
#define CCNL_RIOT_CLIENT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief high level function to fetch a file (all chunks of a file)
|
||||
*
|
||||
@ -103,6 +107,10 @@ int ccnl_riot_client_new_face(kernel_pid_t relay_pid, char *type, char *faceid,
|
||||
int ccnl_riot_client_register_prefix(kernel_pid_t relay_pid, char *prefix,
|
||||
char *faceid, unsigned char *reply_buf);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -11,6 +11,10 @@
|
||||
#include <stdint.h>
|
||||
#include "sixlowpan.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
//[option|length|ipaddr.|packetcount] with up to 15 ipaddr|packetcount pairs
|
||||
// 1 Byte 1 Byte 1 Byte 1 Byte
|
||||
#define ETX_BUF_SIZE (32)
|
||||
@ -99,4 +103,8 @@ void etx_update(etx_neighbor_t *neighbor);
|
||||
#define ETX_PKT_HDR_LEN (2) //Option type + Length (1 Byte each)
|
||||
#define ETX_PKT_DATA (2) //Begin of Data Bytes
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ETX_BEACONING_H_ */
|
||||
|
@ -25,6 +25,10 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* maximum 802.15.4 header length */
|
||||
#define IEEE_802154_MAX_HDR_LEN (23)
|
||||
/* ...and FCS*/
|
||||
@ -109,5 +113,9 @@ uint8_t ieee802154_frame_read(uint8_t *buf, ieee802154_frame_t *frame, uint8_t l
|
||||
void ieee802154_frame_print_fcf_frame(ieee802154_frame_t *frame);
|
||||
uint16_t ieee802154_frame_get_fcs(const uint8_t *frame, uint8_t frame_len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif /* IEEE802154_IEEE802154_FRAME */
|
||||
|
@ -19,6 +19,10 @@
|
||||
#define INET_NTOP_H_
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef AF_INET
|
||||
#define AF_INET 2 ///< internetwork address family: UDP, TCP, etc.
|
||||
#endif
|
||||
@ -50,4 +54,8 @@
|
||||
|
||||
const char *inet_ntop(int af, const void *src, char *dst, size_t size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* INET_NTOP_H_ */
|
||||
|
@ -19,6 +19,10 @@
|
||||
#define INET_PTON_H_
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef AF_INET
|
||||
#define AF_INET 2 ///< internetwork address family: UDP, TCP, etc.
|
||||
#endif
|
||||
@ -54,4 +58,8 @@
|
||||
|
||||
int inet_pton(int af, const char *src, void *dst);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* INET_PTON_H_ */
|
||||
|
@ -28,6 +28,14 @@
|
||||
|
||||
#include "../network_layer/sixlowpan/icmp.h" /* TODO: remove if not needed anymore */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* IPV6_H */
|
||||
/**
|
||||
* @}
|
||||
|
@ -29,6 +29,10 @@
|
||||
|
||||
#include "byteorder.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define BITSET(var,pos) ((var) & (1<<(pos)))
|
||||
|
||||
static inline uint16_t HTONS(uint16_t a)
|
||||
@ -66,5 +70,9 @@ static inline uint64_t NTOHLL(uint64_t a)
|
||||
uint16_t csum(uint16_t sum, uint8_t *buf, uint16_t len);
|
||||
void printArrayRange(uint8_t *array, uint16_t len, char *str);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif /* __NET_HELP_H */
|
||||
|
@ -27,6 +27,10 @@
|
||||
#include "mutex.h"
|
||||
#include "transceiver.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief type to specify types of upper layer addresses
|
||||
*/
|
||||
@ -497,6 +501,10 @@ int32_t net_if_get_pan_id(int if_id);
|
||||
*/
|
||||
int32_t net_if_set_pan_id(int if_id, uint16_t pan_id);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -31,6 +31,10 @@
|
||||
|
||||
#include "cpu-conf.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef PKTBUF_SIZE
|
||||
/**
|
||||
* @brief Maximum size of the packet buffer.
|
||||
@ -183,5 +187,9 @@ int pktbuf_contains(const void *pkt);
|
||||
void pktbuf_reset(void);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __PKTBUF_H_ */
|
||||
/** @} */
|
||||
|
@ -26,6 +26,10 @@
|
||||
|
||||
#include "priority_queue.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief data type for packet queue nodes
|
||||
*
|
||||
@ -129,6 +133,10 @@ static inline void pktqueue_remove(pktqueue_t *queue, pktqueue_node_t *node)
|
||||
priority_queue_remove((priority_queue_t *)queue, (priority_queue_node_t *) node);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __PKTQUEUE_H_ */
|
||||
/**
|
||||
* @}
|
||||
|
@ -26,6 +26,10 @@
|
||||
|
||||
#include "radio/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
packet_handler_t handler;
|
||||
protocol_t protocol;
|
||||
@ -42,5 +46,9 @@ int pm_set_handler(const pm_table_t *table, protocol_t protocol, packet_handler_
|
||||
void pm_remove_handler(const pm_table_t *table, protocol_t protocol, packet_handler_t handler);
|
||||
int pm_invoke(const pm_table_t *table, protocol_t protocol, void *payload, int payload_size, packet_info_t *packet_info);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif /* PROTOCOLMULTIPLEX_H_ */
|
||||
|
@ -35,6 +35,10 @@
|
||||
#include "ipv6.h"
|
||||
#include "rpl/rpl_dodag.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef CC1100_RADIO_MODE
|
||||
#define CC1100_RADIO_MODE CC1100_MODE_WOR
|
||||
|
||||
@ -263,5 +267,9 @@ void rpl_clear_routing_table(void);
|
||||
* */
|
||||
rpl_routing_entry_t *rpl_get_routing_table(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif /* __RPL_H */
|
||||
|
@ -18,6 +18,10 @@
|
||||
#ifndef RPL_CONFIG_H_INCLUDED
|
||||
#define RPL_CONFIG_H_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Default values */
|
||||
#define RPL_NO_DOWNWARD_ROUTES 0x00
|
||||
#define RPL_NON_STORING_MODE 0x01
|
||||
@ -133,4 +137,8 @@ static inline bool RPL_COUNTER_GREATER_THAN(uint8_t A,uint8_t B)
|
||||
#define RPL_GROUNDED_SHIFT 7
|
||||
#define RPL_DEFAULT_OCP 0
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -20,6 +20,10 @@
|
||||
#include "rpl_structs.h"
|
||||
#include "rpl_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void rpl_instances_init(void);
|
||||
rpl_instance_t *rpl_new_instance(uint8_t instanceid);
|
||||
rpl_instance_t *rpl_get_instance(uint8_t instanceid);
|
||||
@ -42,3 +46,7 @@ void rpl_parent_update(rpl_parent_t *parent);
|
||||
void rpl_global_repair(rpl_dodag_t *dodag, ipv6_addr_t *p_addr, uint16_t rank);
|
||||
void rpl_local_repair(void);
|
||||
uint16_t rpl_calc_rank(uint16_t abs_rank, uint16_t minhoprankincrease);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -30,6 +30,10 @@
|
||||
#include "rpl_config.h"
|
||||
#include "rpl.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Initialization of RPL-root.
|
||||
*
|
||||
@ -141,5 +145,9 @@ void recv_rpl_dao_ack_mode(void);
|
||||
*/
|
||||
void rpl_send(ipv6_addr_t *destination, uint8_t *payload, uint16_t p_len, uint8_t next_header);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __RPL_SM_H */
|
||||
/** @} */
|
||||
|
@ -20,6 +20,11 @@
|
||||
|
||||
#ifndef RPL_STRUCTS_H_INCLUDED
|
||||
#define RPL_STRUCTS_H_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Modes of Operation */
|
||||
|
||||
/* DIO Base Object (RFC 6550 Fig. 14) */
|
||||
@ -179,4 +184,8 @@ typedef struct {
|
||||
uint8_t used;
|
||||
} rpl_routing_entry_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -47,5 +47,13 @@
|
||||
#include "sixlowpan/lowpan.h"
|
||||
#include "sixlowpan/mac.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SIXLOWPAN_H */
|
||||
/** @} */
|
||||
|
@ -19,6 +19,10 @@
|
||||
#ifndef SIXLOWPAN_ERROR_H
|
||||
#define SIXLOWPAN_ERROR_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Functions return this if call was success. Only defined if not
|
||||
* already defined by other header.
|
||||
@ -95,5 +99,9 @@
|
||||
*/
|
||||
#define SIXLOWERROR_CSUM (141)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif /* SIXLOWPAN_ERROR_H */
|
||||
|
@ -30,6 +30,10 @@
|
||||
|
||||
#include "sixlowpan/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief ICMPv6 packet type for parameter problem message.
|
||||
* @see <a href="http://tools.ietf.org/html/rfc4443#section-3.4">
|
||||
@ -246,5 +250,10 @@ void icmpv6_send_neighbor_adv(ipv6_addr_t *src, ipv6_addr_t *dst,
|
||||
* @return The internet checksum of the given ICMPv6 packet.
|
||||
*/
|
||||
uint16_t icmpv6_csum(ipv6_hdr_t *ipv6_buf, icmpv6_hdr_t *icmpv6_buf);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SIXLOWPAN_ICMP_H */
|
||||
/** @} */
|
||||
|
@ -31,6 +31,10 @@
|
||||
#include "net_help.h"
|
||||
#include "sixlowpan/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief IPv6 maximum transmission unit.
|
||||
*/
|
||||
@ -542,5 +546,9 @@ void ipv6_iface_set_routing_provider(ipv6_addr_t *(*next_hop)(ipv6_addr_t *dest)
|
||||
*/
|
||||
uint16_t ipv6_csum(ipv6_hdr_t *ipv6_header, uint8_t *buf, uint16_t len, uint8_t proto);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SIXLOWPAN_IP_H */
|
||||
/** @} */
|
||||
|
@ -31,6 +31,10 @@
|
||||
#include "net_if.h"
|
||||
#include "sixlowpan/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief 6LoWPAN dispatch value for uncompressed IPv6 packets.
|
||||
* @see <a href="http://tools.ietf.org/html/rfc4944#section-5.1">
|
||||
@ -301,5 +305,9 @@ void sixlowpan_lowpan_print_reassembly_buffers(void);
|
||||
*/
|
||||
int sixlowpan_lowpan_init(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SIXLOWPAN_LOWPAN_H */
|
||||
/** @} */
|
||||
|
@ -28,6 +28,10 @@
|
||||
|
||||
#include "sixlowpan/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Maximum length of a IEEE 802.15.4 long address represented as string.
|
||||
*/
|
||||
@ -58,5 +62,9 @@ int sixlowpan_mac_send_ieee802154_frame(int if_id, const void *dest,
|
||||
*/
|
||||
kernel_pid_t sixlowpan_mac_init(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif /* SIXLOWPAN_MAC_H */
|
||||
|
@ -30,6 +30,10 @@
|
||||
#include "timex.h"
|
||||
#include "sixlowpan/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define NDP_6LOWPAN_CONTEXT_MAX (16)
|
||||
|
||||
#define NDP_OPT_SLLAO_TYPE (1)
|
||||
@ -227,5 +231,9 @@ ndp_prefix_info_t *ndp_prefix_info_match(int if_id, const ipv6_addr_t *prefix,
|
||||
ndp_a6br_cache_t *ndp_a6br_cache_get_most_current(void);
|
||||
ndp_a6br_cache_t *ndp_a6br_cache_get_oldest(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif /* SIXLOWPAN_NDP_H */
|
||||
|
@ -26,6 +26,10 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Data type to represent an EUI-64.
|
||||
*/
|
||||
@ -394,5 +398,9 @@ typedef enum __attribute__((packed)) {
|
||||
NDP_ADDR_STATE_ANY ///< addresses of this state are always permitted.
|
||||
} ndp_addr_state_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif /* SIXLOWPAN_TYPES_H */
|
||||
|
@ -37,4 +37,12 @@
|
||||
#include "socket_base/socket.h"
|
||||
#include "socket_base/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SOCKET_BASE_H */
|
||||
|
@ -29,6 +29,10 @@
|
||||
#ifndef SOCKET_BASE_IN_H
|
||||
#define SOCKET_BASE_IN_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Protocols (RFC 1700) TODO: may be deleted due to some double definition
|
||||
* in sys/net/sixlowpan/include/sixlowpan/ip.h
|
||||
@ -149,4 +153,8 @@
|
||||
|
||||
#define IN_LOOPBACKNET (127) ///< official!
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SOCKET_BASE_IN_H */
|
||||
|
@ -28,6 +28,10 @@
|
||||
|
||||
#include "socket_base/in.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef uint8_t sa_family_t; ///< POSIX compatible type for address family.
|
||||
typedef uint32_t socklen_t; ///< POSIX compatible type for address length.
|
||||
|
||||
@ -327,6 +331,10 @@ int socket_base_accept(int s, sockaddr6_t *addr, socklen_t *addrlen);
|
||||
*/
|
||||
void socket_base_print_sockets(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -18,6 +18,10 @@
|
||||
#define SOCKET_BASE_TYPES_H_
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* UDP packet header length
|
||||
*/
|
||||
@ -69,6 +73,10 @@ typedef struct __attribute__((packed)) {
|
||||
uint16_t urg_pointer; ///< urgent pointer
|
||||
} tcp_hdr_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -30,6 +30,10 @@
|
||||
#include "socket_base/socket.h"
|
||||
#include "socket_base/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Initializes tcp.
|
||||
*
|
||||
@ -37,4 +41,8 @@
|
||||
*/
|
||||
int tcp_init_transport_layer(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* TCP_H */
|
||||
|
@ -30,6 +30,10 @@
|
||||
#include "socket_base/socket.h"
|
||||
#include "socket_base/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Initializes udp.
|
||||
*
|
||||
@ -37,4 +41,8 @@
|
||||
*/
|
||||
int udp_init_transport_layer(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* UDP_H */
|
||||
|
@ -29,6 +29,10 @@
|
||||
#include "ip.h"
|
||||
#include "semaphore.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern ipv6_addr_t *abr_addr;
|
||||
|
||||
kernel_pid_t border_get_serial_reader(void);
|
||||
@ -38,4 +42,8 @@ uint8_t *get_serial_in_buffer(int offset);
|
||||
|
||||
void border_process_lowpan(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SIXLOWPAN_BORDER_H*/
|
||||
|
@ -24,6 +24,10 @@
|
||||
|
||||
#include "ip.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* packet types of uart-packets */
|
||||
#define BORDER_PACKET_RAW_TYPE (0)
|
||||
#define BORDER_PACKET_CONF_TYPE (2)
|
||||
@ -89,4 +93,8 @@ void multiplex_send_addr_over_uart(ipv6_addr_t *addr);
|
||||
int readpacket(uint8_t *packet_buf, size_t size);
|
||||
int writepacket(uint8_t *packet_buf, size_t size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SIXLOWPAN_BORDERMULTIPLEX_H*/
|
||||
|
@ -28,6 +28,10 @@
|
||||
#include "border.h"
|
||||
#include "bordermultiplex.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* packet types for flowcontrol */
|
||||
#define BORDER_PACKET_ACK_TYPE (1)
|
||||
|
||||
@ -74,4 +78,8 @@ ipv6_addr_t flowcontrol_init(void);
|
||||
void flowcontrol_send_over_uart(border_packet_t *packet, int len);
|
||||
void flowcontrol_deliver_from_uart(border_packet_t *packet, int len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SIXLOWPAN_FLOWCONTROL_H*/
|
||||
|
@ -32,6 +32,10 @@
|
||||
#include "lowpan.h"
|
||||
#include "ip.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum option_types_t {
|
||||
OPT_SLLAO = 1,
|
||||
OPT_TLLAO,
|
||||
@ -58,4 +62,9 @@ void nbr_cache_auto_rem(void);
|
||||
ndp_a6br_cache_t *abr_add_context(uint16_t version, ipv6_addr_t *abr_addr,
|
||||
uint8_t cid);
|
||||
void abr_remove_context(uint8_t cid);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SIXLOWPAN_ICMP_H*/
|
||||
|
@ -33,6 +33,10 @@
|
||||
#include "sixlowpan/ip.h"
|
||||
#include "sixlowpan/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* IPv6 field values */
|
||||
#define IPV6_VER (0x60)
|
||||
/* size of global buffer */
|
||||
@ -99,4 +103,8 @@ ipv6_net_if_hit_t *ipv6_net_if_addr_match(ipv6_net_if_hit_t *hit, const ipv6_add
|
||||
uint32_t get_remaining_time(timex_t *t);
|
||||
void set_remaining_time(timex_t *t, uint32_t time);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SIXLOWPAN_IP_H*/
|
||||
|
@ -25,6 +25,10 @@
|
||||
|
||||
#include "sixlowpan/lowpan.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define IEEE802154_TRANSCEIVER (TRANSCEIVER_AT86RF231 | TRANSCEIVER_CC2420 | TRANSCEIVER_MC1322X)
|
||||
|
||||
typedef struct {
|
||||
@ -48,4 +52,8 @@ lowpan_context_t *lowpan_context_update(uint8_t num,
|
||||
lowpan_context_t *lowpan_context_get(void);
|
||||
lowpan_context_t *lowpan_context_num_lookup(uint8_t num);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SIXLOWPAN_LOWPAN_H */
|
||||
|
@ -14,6 +14,10 @@
|
||||
#define _SIXLOWPAN_SERIALNUMBER_H
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum serial_comp_res_t {
|
||||
LESS = 0,
|
||||
EQUAL = 1,
|
||||
@ -87,4 +91,8 @@ serial_comp_res_t serial_comp16(uint16_t s1, uint16_t s2);
|
||||
**/
|
||||
serial_comp_res_t serial_comp32(uint32_t s1, uint32_t s2);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SIXLOWPAN_SERIALNUMBER_H*/
|
||||
|
@ -12,6 +12,14 @@
|
||||
#include "rpl/rpl_structs.h"
|
||||
#include "rpl/rpl_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
rpl_of_t *rpl_get_of0(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* OF0_H */
|
||||
|
@ -12,6 +12,10 @@
|
||||
#include "rpl/rpl_structs.h"
|
||||
#include "rpl/rpl_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Disallow links with greater than 4 expected
|
||||
* transmission counts on the selected path.
|
||||
@ -46,4 +50,8 @@
|
||||
|
||||
rpl_of_t *rpl_get_of_mrhof(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* OF_MRHOF_H */
|
||||
|
@ -18,6 +18,10 @@
|
||||
#include "vtimer.h"
|
||||
#include "thread.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define TRICKLE_TIMER_STACKSIZE (KERNEL_CONF_STACKSIZE_MAIN)
|
||||
#define TRICKLE_INTERVAL_STACKSIZE (KERNEL_CONF_STACKSIZE_MAIN)
|
||||
#define DAO_DELAY_STACKSIZE (KERNEL_CONF_STACKSIZE_MAIN)
|
||||
@ -29,3 +33,7 @@ void start_trickle(uint8_t DIOINtMin, uint8_t DIOIntDoubl, uint8_t DIORedundancy
|
||||
void trickle_increment_counter(void);
|
||||
void delay_dao(void);
|
||||
void dao_ack_received(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -16,6 +16,10 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// Function IDs
|
||||
#define FID_SIXLOWIP_TCP 0
|
||||
#define FID_SIXLOWIP_UDP 1
|
||||
@ -40,6 +44,10 @@ int socket_base_net_msg_reply(msg_t *m, msg_t *reply, uint16_t message);
|
||||
int socket_base_net_msg_send(msg_t *m, kernel_pid_t pid, bool block, uint16_t message);
|
||||
int socket_base_net_msg_send_recv(msg_t *m, msg_t *reply, kernel_pid_t pid, uint16_t message);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MSG_HELP_H_ */
|
||||
/**
|
||||
* @}
|
||||
|
@ -90,10 +90,18 @@ typedef struct {
|
||||
|
||||
extern socket_internal_t socket_base_sockets[MAX_SOCKETS];
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
socket_internal_t *socket_base_get_socket(int s);
|
||||
uint16_t socket_base_get_free_source_port(uint8_t protocol);
|
||||
int socket_base_exists_socket(int socket);
|
||||
int socket_base_socket(int domain, int type, int protocol);
|
||||
void socket_base_print_sockets(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SOCKET_BASE_SOCKET */
|
||||
|
@ -21,6 +21,10 @@
|
||||
#include "socket_base/types.h"
|
||||
#include "socket.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define TCP_EOO_OPTION (0x00) /* End of option list */
|
||||
#define TCP_NOP_OPTION (0x01) /* No operation */
|
||||
#define TCP_MSS_OPTION (0x02) /* Maximum segment size */
|
||||
@ -108,6 +112,10 @@ int32_t tcp_recv(int s, void *buf, uint32_t len, int flags);
|
||||
bool tcp_socket_compliancy(int s);
|
||||
int tcp_teardown(socket_internal_t *current_socket);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -20,6 +20,10 @@
|
||||
|
||||
#include "tcp.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef TCP_HC
|
||||
|
||||
#define FULL_HEADER 1
|
||||
@ -30,6 +34,11 @@ void update_tcp_hc_context(bool incoming, socket_internal_t *current_socket, tcp
|
||||
uint16_t compress_tcp_packet(socket_internal_t *current_socket, uint8_t *current_tcp_packet, ipv6_hdr_t *temp_ipv6_header, uint8_t flags, uint8_t payload_length);
|
||||
socket_internal_t *decompress_tcp_packet(ipv6_hdr_t *temp_ipv6_header);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* TCP_HC_H_ */
|
||||
/**
|
||||
* @}
|
||||
|
@ -15,6 +15,10 @@
|
||||
#ifndef TCP_TIMER_H_
|
||||
#define TCP_TIMER_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define TCP_TIMER_RESOLUTION 500*1000
|
||||
|
||||
#define SECOND 1000.0f*1000.0f
|
||||
@ -35,6 +39,10 @@
|
||||
|
||||
void *tcp_general_timer(void *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* TCP_TIMER_H_ */
|
||||
/**
|
||||
* @}
|
||||
|
@ -21,6 +21,10 @@
|
||||
#include "ipv6.h"
|
||||
#include "socket_base/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define UDP_STACK_SIZE KERNEL_CONF_STACKSIZE_MAIN
|
||||
#define UDP_PKT_RECV_BUF_SIZE (64)
|
||||
|
||||
@ -31,6 +35,10 @@ bool udp_socket_compliancy(int s);
|
||||
int32_t udp_recvfrom(int s, void *buf, uint32_t len, int flags, sockaddr6_t *from, uint32_t *fromlen);
|
||||
int32_t udp_sendto(int s, const void *buf, uint32_t len, int flags, sockaddr6_t *to, socklen_t tolen);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -28,6 +28,10 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Allocation a block of memory.
|
||||
* @param[in] size Size of the block to allocate in bytes.
|
||||
@ -65,6 +69,10 @@ void *calloc(int size, size_t cnt);
|
||||
*/
|
||||
void free(void *ptr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __MALLOC_H */
|
||||
|
||||
/**
|
||||
|
@ -3,11 +3,15 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include "priority_queue.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Value returned if `sem_open' failed. */
|
||||
#define SEM_FAILED ((sem_t *) 0)
|
||||
|
||||
#include "priority_queue.h"
|
||||
|
||||
typedef struct sem {
|
||||
volatile unsigned int value;
|
||||
priority_queue_t queue;
|
||||
@ -98,4 +102,8 @@ int sem_post(sem_t *sem);
|
||||
*/
|
||||
int sem_getvalue(sem_t *sem, int *sval);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* semaphore.h */
|
||||
|
@ -25,6 +25,10 @@
|
||||
#include <sys/types.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Returns the position of the first (least significant) bit set in
|
||||
* integer *i*, or 0 if no bits are set in i.
|
||||
@ -115,4 +119,8 @@ int strncasecmp(const char *s1, const char *s2, size_t n);
|
||||
*/
|
||||
#define strcasecmp_l(s1, s2, l) strncasecmp(s1, s2, -1)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* STRINGS_H */
|
||||
|
@ -28,6 +28,10 @@
|
||||
#include "timex.h"
|
||||
#include "vtimer.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define STDIN_FILENO 0 ///< stdin file descriptor
|
||||
#define STDOUT_FILENO 1 ///< stdout file descriptor
|
||||
#define STDERR_FILENO 2 ///< stderr file descriptor
|
||||
@ -100,6 +104,10 @@ int usleep(useconds_t useconds);
|
||||
*/
|
||||
unsigned int sleep(unsigned int seconds);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -29,6 +29,10 @@
|
||||
#include "inet_ntop.h"
|
||||
#include "inet_pton.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef uint16_t in_port_t; ///< Internet port type
|
||||
typedef uint32_t in_addr_t; ///< IPv4 address type
|
||||
|
||||
@ -94,6 +98,10 @@ struct in_addr {
|
||||
*/
|
||||
#define ntohs(netshort) NTOHS(netshort)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -29,6 +29,10 @@
|
||||
#include "ipv6.h"
|
||||
#include "socket_base/socket.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* IPv4 socket address type.
|
||||
*/
|
||||
@ -151,6 +155,10 @@ extern const struct sockaddr_in6 in6addr_loopback;
|
||||
*/
|
||||
#define IN6_IS_ADDR_MULTICAST(a) (((const uint8_t *) (a))[0] == 0xff)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -38,6 +38,10 @@
|
||||
|
||||
#include "socket_base/socket.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Used to define the socket address.
|
||||
*/
|
||||
@ -464,6 +468,10 @@ int setsockopt(int socket, int level, int option_name, const void *option_value,
|
||||
*/
|
||||
int socket(int domain, int type, int protocol);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -32,6 +32,14 @@
|
||||
#include "pthread_cancellation.h"
|
||||
#include "pthread_cond.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -11,6 +11,10 @@
|
||||
|
||||
#include "mutex.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def PTHREAD_PROCESS_SHARED
|
||||
* @brief Share the structure with child processes (default).
|
||||
@ -120,6 +124,10 @@ int pthread_barrierattr_getpshared(const pthread_barrierattr_t *attr, int *pshar
|
||||
*/
|
||||
int pthread_barrierattr_setpshared(pthread_barrierattr_t *attr, int pshared);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -10,6 +10,10 @@
|
||||
#ifndef __SYS__POSIX__PTHREAD_CANCELLCATION__H
|
||||
#define __SYS__POSIX__PTHREAD_CANCELLCATION__H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define PTHREAD_CANCEL_DISABLE 0
|
||||
#define PTHREAD_CANCEL_ENABLE 1
|
||||
|
||||
@ -50,6 +54,10 @@ int pthread_cancel(pthread_t th);
|
||||
*/
|
||||
void pthread_testcancel(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -9,6 +9,10 @@
|
||||
#ifndef __SYS__POSIX__PTHREAD_CLEANUP__H
|
||||
#define __SYS__POSIX__PTHREAD_CLEANUP__H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Internal structure for pthread_cleanup_push()
|
||||
*/
|
||||
@ -79,6 +83,10 @@ void __pthread_cleanup_pop(__pthread_cleanup_datum_t *datum, int execute);
|
||||
__pthread_cleanup_pop(&____datum__, ____execute__); \
|
||||
} while (0)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -24,6 +24,10 @@
|
||||
# include "msp430_types.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @note condition attributes are currently NOT USED in RIOT condition variables
|
||||
*/
|
||||
@ -132,5 +136,9 @@ int pthread_cond_signal(struct pthread_cond_t *cond);
|
||||
*/
|
||||
int pthread_cond_broadcast(struct pthread_cond_t *cond);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif /* _CONDITION_VARIABLE_H */
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user