-
Notifications
You must be signed in to change notification settings - Fork 424
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: Idddee819530e8eb497a8abf72aa1f94a7b30d40b Signed-off-by: Dave Thaler <[email protected]>
- Loading branch information
Showing
33 changed files
with
679 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#ifndef _COAP_CONFIG_H_ | ||
#define _COAP_CONFIG_H_ | ||
|
||
/* Define to 1 if you have <Ws2tcpip.h> header file. */ | ||
#if defined(_WIN32) | ||
#define HAVE_WS2TCPIP_H 1 | ||
#endif | ||
|
||
/* Define to 1 if you have <Winsock2.h> header file. */ | ||
#if defined(_WIN32) | ||
#define HAVE_WINSOCK2_H 1 | ||
#endif | ||
|
||
#ifdef _WIN32 | ||
#define ssize_t SSIZE_T | ||
#define in_port_t uint16_t | ||
#endif | ||
|
||
/* Define to the full name of this package. */ | ||
#define PACKAGE_NAME "libcoap" | ||
|
||
/* Define to the full name and version of this package. */ | ||
#define PACKAGE_STRING "libcoap 4.1.1" | ||
|
||
#ifndef COAP_STATIC_INLINE | ||
# if defined(__cplusplus) | ||
# define COAP_STATIC_INLINE inline | ||
# else | ||
# ifdef _MSC_VER | ||
# define COAP_STATIC_INLINE static __inline | ||
# else | ||
# define COAP_STATIC_INLINE static inline | ||
# endif | ||
# endif | ||
#endif | ||
|
||
#endif /* _COAP_CONFIG_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 * -*- */ | ||
|
||
/* coap_list.h -- CoAP list structures | ||
* | ||
* Copyright (C) 2010,2011,2015 Olaf Bergmann <[email protected]> | ||
* | ||
* This file is part of the CoAP library libcoap. Please see README for terms of | ||
* use. | ||
*/ | ||
|
||
#ifndef _COAP_LIST_H_ | ||
#define _COAP_LIST_H_ | ||
|
||
#include "utlist.h" | ||
|
||
struct coap_linkedlistnode { | ||
struct coap_linkedlistnode *next; | ||
void *data; | ||
|
||
/** | ||
* Callback function that is called from coap_delete to release | ||
* additional memory allocated by data Set to NULL if you do not | ||
* need this. Note that data is free'd automatically. */ | ||
void (*delete_func)(void *); | ||
}; | ||
|
||
typedef struct coap_linkedlistnode coap_list_t; | ||
|
||
/** | ||
* Adds node to given queue, ordered by specified order function. Returns 1 | ||
* when insert was successful, 0 otherwise. | ||
*/ | ||
int coap_insert(coap_list_t **queue, coap_list_t *node, int (*order)(void *, void *)); | ||
|
||
/* destroys specified node */ | ||
int coap_delete(coap_list_t *node); | ||
|
||
/* removes all items from given queue and frees the allocated storage */ | ||
void coap_delete_list(coap_list_t *queue); | ||
|
||
/** | ||
* Creates a new list node and adds the given data object. The memory allocated | ||
* by data will be released by coap_delete() with the new node. Returns the | ||
* new list node. | ||
*/ | ||
coap_list_t *coap_new_listnode(void *data, void (*delete_func)(void *)); | ||
|
||
#endif /* _COAP_LIST_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.