{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1730921186,
"reponame":"libwebsockets",
"desc":"libwebsockets lightweight C networking library",
"owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://libwebsockets.org/repo/libwebsockets",
"f":3,
"items": [
{"schema":"libjg2-1",
"cid":"e1302efaed2fdcfc434619ca104ca03a",
"oid":{ "oid": "626f8816cfb211ec3ccfa56dc9f67af251e130e3", "alias": [ "refs/heads/main"]},"blobname": "lib/plat/unix/private-lib-plat-unix.h", "blob": " /*\n * libwebsockets - small server side websockets and web server implementation\n *\n * Copyright (C) 2010 - 2019 Andy Green \u003candy@warmcat.com\u003e\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \u0022Software\u0022), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \u0022AS IS\u0022, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n *\n * Included from lib/private-lib-core.h if no explicit platform\n */\n\n#include \u003cfcntl.h\u003e\n#include \u003cstrings.h\u003e\n#include \u003cunistd.h\u003e\n\n#include \u003cnetinet/in.h\u003e\n#include \u003cnetinet/tcp.h\u003e\n#include \u003carpa/inet.h\u003e\n#include \u003cpoll.h\u003e\n#include \u003cnetdb.h\u003e\n\n#ifndef __cplusplus\n#include \u003cerrno.h\u003e\n#endif\n#include \u003cnetdb.h\u003e\n#include \u003csignal.h\u003e\n\n#include \u003csys/socket.h\u003e\n#include \u003csys/types.h\u003e\n#include \u003csys/stat.h\u003e\n#include \u003csys/time.h\u003e\n#include \u003csys/mman.h\u003e\n#include \u003csys/un.h\u003e\n#if defined(LWS_HAVE_EVENTFD)\n#include \u003csys/eventfd.h\u003e\n#endif\n\n#if defined(__APPLE__)\n#include \u003cmachine/endian.h\u003e\n#endif\n#if defined(__FreeBSD__)\n#include \u003csys/endian.h\u003e\n#endif\n#if defined(__linux__)\n#include \u003cendian.h\u003e\n#include \u003clinux/if_packet.h\u003e\n#include \u003cnet/if.h\u003e\n#endif\n#if defined(__QNX__)\n\t#include \u003cgulliver.h\u003e\n\t#if defined(__LITTLEENDIAN__)\n\t\t#define BYTE_ORDER __LITTLEENDIAN__\n\t\t#define LITTLE_ENDIAN __LITTLEENDIAN__\n\t\t#define BIG_ENDIAN 4321 /* to show byte order (taken from gcc); for suppres warning that BIG_ENDIAN is not defined. */\n\t#endif\n\t#if defined(__BIGENDIAN__)\n\t\t#define BYTE_ORDER __BIGENDIAN__\n\t\t#define LITTLE_ENDIAN 1234 /* to show byte order (taken from gcc); for suppres warning that LITTLE_ENDIAN is not defined. */\n\t\t#define BIG_ENDIAN __BIGENDIAN__\n\t#endif\n#endif\n\n#if defined(LWS_HAVE_PTHREAD_H)\n#include \u003cpthread.h\u003e\ntypedef pthread_mutex_t lws_mutex_t;\n#define lws_mutex_init(x)\tpthread_mutex_init(\u0026(x), NULL)\n#define lws_mutex_destroy(x)\tpthread_mutex_destroy(\u0026(x))\n#define lws_mutex_lock(x)\tpthread_mutex_lock(\u0026(x))\n#define lws_mutex_unlock(x)\tpthread_mutex_unlock(\u0026(x))\n#endif\n\n#if defined(__sun) \u0026\u0026 defined(__GNUC__)\n\n#include \u003carpa/nameser_compat.h\u003e\n\n#if !defined (BYTE_ORDER)\n#define BYTE_ORDER __BYTE_ORDER__\n#endif\n\n#if !defined(LITTLE_ENDIAN)\n#define LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__\n#endif\n\n#if !defined(BIG_ENDIAN)\n#define BIG_ENDIAN __ORDER_BIG_ENDIAN__\n#endif\n\n#endif /* sun + GNUC */\n\n#if !defined(BYTE_ORDER)\n#define BYTE_ORDER __BYTE_ORDER\n#endif\n#if !defined(LITTLE_ENDIAN)\n#define LITTLE_ENDIAN __LITTLE_ENDIAN\n#endif\n#if !defined(BIG_ENDIAN)\n#define BIG_ENDIAN __BIG_ENDIAN\n#endif\n\n#if defined(LWS_BUILTIN_GETIFADDRS)\n#include \u0022./misc/getifaddrs.h\u0022\n#else\n\n#if defined(__HAIKU__)\n#define _BSD_SOURCE\n#endif\n#include \u003cifaddrs.h\u003e\n\n#endif\n\n#if defined (__sun) || defined(__HAIKU__) || defined(__QNX__) || defined(__ANDROID__) || defined(__NuttX__)\n#include \u003csyslog.h\u003e\n\n#if defined(__ANDROID__)\n#include \u003csys/resource.h\u003e\n#endif\n\n#else\n#include \u003csys/syslog.h\u003e\n#endif\n\n#ifdef __QNX__\n# include \u0022netinet/tcp_var.h\u0022\n# define TCP_KEEPINTVL TCPCTL_KEEPINTVL\n# define TCP_KEEPIDLE TCPCTL_KEEPIDLE\n# define TCP_KEEPCNT TCPCTL_KEEPCNT\n#endif\n\n#define LWS_ERRNO errno\n#define LWS_EAGAIN EAGAIN\n#define LWS_EALREADY EALREADY\n#define LWS_EINPROGRESS EINPROGRESS\n#define LWS_EINTR EINTR\n#define LWS_EISCONN EISCONN\n#define LWS_ENOTCONN ENOTCONN\n#define LWS_EWOULDBLOCK EWOULDBLOCK\n#define LWS_EADDRINUSE EADDRINUSE\n#define lws_set_blocking_send(wsi)\n#define LWS_SOCK_INVALID (-1)\n\nstruct lws_context;\n\nstruct lws *\nwsi_from_fd(const struct lws_context *context, int fd);\n\nint\ninsert_wsi(const struct lws_context *context, struct lws *wsi);\n\nstruct lws_dhcpc_ifstate;\nint\nlws_plat_ifconfig(int fd, struct lws_dhcpc_ifstate *is);\n\nvoid\ndelete_from_fd(const struct lws_context *context, int fd);\n\n#ifndef LWS_NO_FORK\n#ifdef LWS_HAVE_SYS_PRCTL_H\n#include \u003csys/prctl.h\u003e\n#endif\n#endif\n\n#define compatible_close(x) close(x)\n#define compatible_file_close(fd) close(fd)\n#define lws_plat_socket_offset() (0)\n\n/*\n * Mac OSX as well as iOS do not define the MSG_NOSIGNAL flag,\n * but happily have something equivalent in the SO_NOSIGPIPE flag.\n */\n#ifdef __APPLE__\n/* iOS SDK 12+ seems to define it, undef it for compatibility both ways */\n#undef MSG_NOSIGNAL\n#define MSG_NOSIGNAL SO_NOSIGPIPE\n#endif\n\n/*\n * Solaris 11.X only supports POSIX 2001, MSG_NOSIGNAL appears in\n * POSIX 2008.\n */\n#if defined(__sun) \u0026\u0026 !defined(MSG_NOSIGNAL)\n #define MSG_NOSIGNAL 0\n#endif\n\nint\nlws_plat_rawudp_broadcast(uint8_t *p, const uint8_t *canned, size_t canned_len,\n\t\t\t size_t n, int fd, const char *iface);\n\nint\nlws_plat_if_up(const char *ifname, int fd, int up);\n","s":{"c":1730921186,"u": 372}}
],"g": 3214,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 1, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}