5502879a5b
This is very much still work in progress and much more will change before the final 2.0.0 Some APIs have changed. New libraries have been added. LittleFS included. Co-authored-by: Seon Rozenblum <seonr@3sprockets.com> Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com> Co-authored-by: geeksville <kevinh@geeksville.com> Co-authored-by: Mike Dunston <m_dunston@comcast.net> Co-authored-by: Unexpected Maker <seon@unexpectedmaker.com> Co-authored-by: Seon Rozenblum <seonr@3sprockets.com> Co-authored-by: microDev <70126934+microDev1@users.noreply.github.com> Co-authored-by: tobozo <tobozo@users.noreply.github.com> Co-authored-by: bobobo1618 <bobobo1618@users.noreply.github.com> Co-authored-by: lorol <lorolouis@gmail.com> Co-authored-by: geeksville <kevinh@geeksville.com> Co-authored-by: Limor "Ladyada" Fried <limor@ladyada.net> Co-authored-by: Sweety <switi.mhaiske@espressif.com> Co-authored-by: Loick MAHIEUX <loick111@gmail.com> Co-authored-by: Larry Bernstone <lbernstone@gmail.com> Co-authored-by: Valerii Koval <valeros@users.noreply.github.com> Co-authored-by: 快乐的我531 <2302004040@qq.com> Co-authored-by: chegewara <imperiaonline4@gmail.com> Co-authored-by: Clemens Kirchgatterer <clemens@1541.org> Co-authored-by: Aron Rubin <aronrubin@gmail.com> Co-authored-by: Pete Lewis <601236+lewispg228@users.noreply.github.com>
55 lines
1.5 KiB
C
55 lines
1.5 KiB
C
/*
|
|
* libcoap.h -- platform specific header file for CoAP stack
|
|
*
|
|
* Copyright (C) 2015 Carsten Schoenert <c.schoenert@t-online.de>
|
|
*
|
|
* This file is part of the CoAP library libcoap. Please see README for terms
|
|
* of use.
|
|
*/
|
|
|
|
#ifndef COAP_LIBCOAP_H_
|
|
#define COAP_LIBCOAP_H_
|
|
|
|
/* The non posix embedded platforms like Contiki, TinyOS, RIOT, ... doesn't have
|
|
* a POSIX compatible header structure so we have to slightly do some platform
|
|
* related things. Currently there is only Contiki available so we check for a
|
|
* CONTIKI environment and do *not* include the POSIX related network stuff. If
|
|
* there are other platforms in future there need to be analogous environments.
|
|
*
|
|
* The CONTIKI variable is within the Contiki build environment! */
|
|
|
|
#if defined(_WIN32)
|
|
#pragma comment(lib,"Ws2_32.lib")
|
|
#include <ws2tcpip.h>
|
|
typedef SSIZE_T ssize_t;
|
|
typedef USHORT in_port_t;
|
|
#elif !defined (CONTIKI)
|
|
#include <netinet/in.h>
|
|
#include <sys/socket.h>
|
|
#endif /* CONTIKI */
|
|
|
|
#ifndef COAP_STATIC_INLINE
|
|
# if defined(__cplusplus)
|
|
# define COAP_STATIC_INLINE inline
|
|
# else
|
|
# if defined(_MSC_VER)
|
|
# define COAP_STATIC_INLINE static __inline
|
|
# else
|
|
# define COAP_STATIC_INLINE static inline
|
|
# endif
|
|
# endif
|
|
#endif
|
|
#ifndef COAP_DEPRECATED
|
|
# if defined(_MSC_VER)
|
|
# define COAP_DEPRECATED __declspec(deprecated)
|
|
# else
|
|
# define COAP_DEPRECATED __attribute__ ((deprecated))
|
|
# endif
|
|
#endif
|
|
|
|
void coap_startup(void);
|
|
|
|
void coap_cleanup(void);
|
|
|
|
#endif /* COAP_LIBCOAP_H_ */
|