iwyu: management.c

This commit is contained in:
Hamish Coleman 2023-06-16 08:30:22 +01:00
parent 0c6f7ca5cb
commit 06c2e012d7

View File

@ -3,22 +3,24 @@
*
*/
#include <stdio.h>
#ifndef WIN32
#include <sys/socket.h>
#include <netdb.h>
#endif
#include <pearson.h> // for pearson_hash_64
#include <stdio.h> // for snprintf, NULL, size_t
#include <stdlib.h> // for strtoul
#include <string.h> // for strtok, strlen, strncpy
#include "management.h"
#include "n2n.h" // for TRACE_DEBUG, traceEvent
#ifndef WIN32
#include <netdb.h> // for getnameinfo, NI_NUMERICHOST, NI_NUMERICSERV
#include <sys/socket.h> // for sendto, sockaddr
#endif
// TODO: move logging defs in their own header and include that
void setTraceLevel (int level);
int getTraceLevel ();
#include <pearson.h>
#include "management.h"
ssize_t send_reply (mgmt_req_t *req, strbuf_t *buf, size_t msg_len) {
// TODO: better error handling (counters?)
return sendto(req->mgmt_sock, buf->str, msg_len, 0,