Browse Source

c++: sys: add extern C to header files

dev/timer
BytesGalore 8 years ago
parent
commit
de3c3cebd0
  1. 8
      sys/include/auto_init.h
  2. 8
      sys/include/bloom.h
  3. 8
      sys/include/board_uart0.h
  4. 9
      sys/include/cbor.h
  5. 8
      sys/include/chardev_thread.h
  6. 8
      sys/include/color.h
  7. 8
      sys/include/crypto/3des.h
  8. 7
      sys/include/crypto/aes.h
  9. 8
      sys/include/crypto/cbcmode.h
  10. 8
      sys/include/crypto/ciphers.h
  11. 7
      sys/include/crypto/rc5.h
  12. 8
      sys/include/crypto/sha256.h
  13. 8
      sys/include/crypto/skipjack.h
  14. 8
      sys/include/crypto/twofish.h
  15. 8
      sys/include/fd.h
  16. 8
      sys/include/hash_string.h
  17. 8
      sys/include/hashes.h
  18. 8
      sys/include/ping.h
  19. 8
      sys/include/pipe.h
  20. 8
      sys/include/posix_io.h
  21. 8
      sys/include/ps.h
  22. 8
      sys/include/radio/radio.h
  23. 8
      sys/include/radio/types.h
  24. 8
      sys/include/random.h
  25. 8
      sys/include/ringbuffer.h
  26. 8
      sys/include/shell.h
  27. 8
      sys/include/shell_commands.h
  28. 8
      sys/include/timex.h
  29. 8
      sys/include/tm.h
  30. 8
      sys/include/transceiver.h
  31. 8
      sys/include/vtimer.h
  32. 8
      sys/net/ccn_lite/ccnl-core.h
  33. 8
      sys/net/ccn_lite/ccnl-ext.h
  34. 8
      sys/net/ccn_lite/ccnl-includes.h
  35. 8
      sys/net/ccn_lite/ccnl-pdu.h
  36. 8
      sys/net/ccn_lite/ccnl-platform.h
  37. 8
      sys/net/ccn_lite/ccnl-riot-compat.h
  38. 8
      sys/net/ccn_lite/ccnl.h
  39. 8
      sys/net/ccn_lite/ccnx.h
  40. 8
      sys/net/ccn_lite/util/ccn-lite-ctrl.h
  41. 8
      sys/net/include/ccn_lite/ccnl-riot.h
  42. 8
      sys/net/include/ccn_lite/test_data/text.txt.ccnb.h
  43. 8
      sys/net/include/ccn_lite/util/ccnl-riot-client.h
  44. 8
      sys/net/include/etx_beaconing.h
  45. 8
      sys/net/include/ieee802154_frame.h
  46. 8
      sys/net/include/inet_ntop.h
  47. 8
      sys/net/include/inet_pton.h
  48. 8
      sys/net/include/ipv6.h
  49. 8
      sys/net/include/net_help.h
  50. 8
      sys/net/include/net_if.h
  51. 8
      sys/net/include/pktbuf.h
  52. 8
      sys/net/include/pktqueue.h
  53. 8
      sys/net/include/protocol-multiplex.h
  54. 8
      sys/net/include/rpl.h
  55. 8
      sys/net/include/rpl/rpl_config.h
  56. 8
      sys/net/include/rpl/rpl_dodag.h
  57. 8
      sys/net/include/rpl/rpl_storing.h
  58. 9
      sys/net/include/rpl/rpl_structs.h
  59. 8
      sys/net/include/sixlowpan.h
  60. 8
      sys/net/include/sixlowpan/error.h
  61. 9
      sys/net/include/sixlowpan/icmp.h
  62. 8
      sys/net/include/sixlowpan/ip.h
  63. 8
      sys/net/include/sixlowpan/lowpan.h
  64. 8
      sys/net/include/sixlowpan/mac.h
  65. 8
      sys/net/include/sixlowpan/ndp.h
  66. 8
      sys/net/include/sixlowpan/types.h
  67. 8
      sys/net/include/socket_base.h
  68. 8
      sys/net/include/socket_base/in.h
  69. 8
      sys/net/include/socket_base/socket.h
  70. 8
      sys/net/include/socket_base/types.h
  71. 8
      sys/net/include/tcp.h
  72. 8
      sys/net/include/udp.h
  73. 8
      sys/net/network_layer/sixlowpan/border/border.h
  74. 8
      sys/net/network_layer/sixlowpan/border/bordermultiplex.h
  75. 8
      sys/net/network_layer/sixlowpan/border/flowcontrol.h
  76. 9
      sys/net/network_layer/sixlowpan/icmp.h
  77. 8
      sys/net/network_layer/sixlowpan/ip.h
  78. 8
      sys/net/network_layer/sixlowpan/lowpan.h
  79. 8
      sys/net/network_layer/sixlowpan/serialnumber.h
  80. 8
      sys/net/routing/rpl/of0.h
  81. 8
      sys/net/routing/rpl/of_mrhof.h
  82. 8
      sys/net/routing/rpl/trickle.h
  83. 8
      sys/net/transport_layer/socket_base/msg_help.h
  84. 8
      sys/net/transport_layer/socket_base/socket.h
  85. 8
      sys/net/transport_layer/tcp/tcp.h
  86. 9
      sys/net/transport_layer/tcp/tcp_hc.h
  87. 8
      sys/net/transport_layer/tcp/tcp_timer.h
  88. 8
      sys/net/transport_layer/udp/udp.h
  89. 8
      sys/oneway-malloc/include/malloc.h
  90. 12
      sys/posix/include/semaphore.h
  91. 8
      sys/posix/include/strings.h
  92. 8
      sys/posix/include/unistd.h
  93. 8
      sys/posix/pnet/include/arpa/inet.h
  94. 8
      sys/posix/pnet/include/netinet/in.h
  95. 8
      sys/posix/pnet/include/sys/socket.h
  96. 8
      sys/posix/pthread/include/pthread.h
  97. 8
      sys/posix/pthread/include/pthread_barrier.h
  98. 8
      sys/posix/pthread/include/pthread_cancellation.h
  99. 8
      sys/posix/pthread/include/pthread_cleanup.h
  100. 8
      sys/posix/pthread/include/pthread_cond.h
  101. Some files were not shown because too many files have changed in this diff Show More

8
sys/include/auto_init.h

@ -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 */

8
sys/include/bloom.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 */

8
sys/include/board_uart0.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 */

9
sys/include/cbor.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
/** @} */

8
sys/include/chardev_thread.h

@ -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 */

8
sys/include/color.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 */
/** @} */

8
sys/include/crypto/3des.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_ */

7
sys/include/crypto/aes.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 */

8
sys/include/crypto/cbcmode.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_ */

8
sys/include/crypto/ciphers.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_ */

7
sys/include/crypto/rc5.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_ */

8
sys/include/crypto/sha256.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_ */

8
sys/include/crypto/skipjack.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_ */

8
sys/include/crypto/twofish.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_ */

8
sys/include/fd.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 */

8
sys/include/hash_string.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 */

8
sys/include/hashes.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 */

8
sys/include/ping.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

8
sys/include/pipe.h

@ -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
/**
* @}

8
sys/include/posix_io.h

@ -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 */

8
sys/include/ps.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 */

8
sys/include/radio/radio.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_ */

8
sys/include/radio/types.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_ */

8
sys/include/random.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

8
sys/include/ringbuffer.h

@ -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 */

8
sys/include/shell.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 */

8
sys/include/shell_commands.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 */

8
sys/include/timex.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 */

8
sys/include/tm.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

8
sys/include/transceiver.h

@ -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 */
/** @} */

8
sys/include/vtimer.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 */

8
sys/net/ccn_lite/ccnl-core.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

8
sys/net/ccn_lite/ccnl-ext.h

@ -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

8
sys/net/ccn_lite/ccnl-includes.h

@ -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

8
sys/net/ccn_lite/ccnl-pdu.h

@ -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

8
sys/net/ccn_lite/ccnl-platform.h

@ -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

8
sys/net/ccn_lite/ccnl-riot-compat.h

@ -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

8
sys/net/ccn_lite/ccnl.h

@ -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

8
sys/net/ccn_lite/ccnx.h

@ -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

8
sys/net/ccn_lite/util/ccn-lite-ctrl.h

@ -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

8
sys/net/include/ccn_lite/ccnl-riot.h

@ -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
/**
* @}
*/

8
sys/net/include/ccn_lite/test_data/text.txt.ccnb.h

@ -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

8
sys/net/include/ccn_lite/util/ccnl-riot-client.h

@ -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
/**
* @}
*/

8
sys/net/include/etx_beaconing.h

@ -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_ */

8
sys/net/include/ieee802154_frame.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 */

8
sys/net/include/inet_ntop.h

@ -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_ */

8
sys/net/include/inet_pton.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_ */

8
sys/net/include/ipv6.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 */
/**
* @}

8
sys/net/include/net_help.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 */

8
sys/net/include/net_if.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
/**
* @}
*/

8
sys/net/include/pktbuf.h

@ -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_ */
/** @} */

8
sys/net/include/pktqueue.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_ */
/**
* @}

8
sys/net/include/protocol-multiplex.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_ */

8
sys/net/include/rpl.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 */

8
sys/net/include/rpl/rpl_config.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

8
sys/net/include/rpl/rpl_dodag.h

@ -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);