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

// jem - moved define of COAP_STATIC_INLINE and COAP_DEPRECATED to another header file so a
// source file can just include this. Have got into multiple include hell with lwIP on FreeRTOS.
// Note that this define used to be after the other #includes.

#include "static_inline.h"

#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>  jem
#include <sys/socket.h>
#endif /* CONTIKI */



void coap_startup(void);

void coap_cleanup(void);

#endif /* COAP_LIBCOAP_H_ */
