deheader cleanup
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
#include <getopt.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "buf.h"
|
||||
#include "hex.h"
|
||||
#include "packet.h"
|
||||
#include "receive.h"
|
||||
#include "uuid.h"
|
||||
|
||||
#include "airspy_adsb.h"
|
||||
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
#include <pthread.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "asyncaddrinfo.h"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "buf.h"
|
||||
#include "packet.h"
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
#include <assert.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "buf.h"
|
||||
#include "flow.h"
|
||||
#include "list.h"
|
||||
#include "log.h"
|
||||
#include "peer.h"
|
||||
#include "uuid.h"
|
||||
|
||||
@@ -3,17 +3,13 @@
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/epoll.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "flow.h"
|
||||
#include "list.h"
|
||||
#include "log.h"
|
||||
#include "peer.h"
|
||||
#include "receive.h"
|
||||
#include "send.h"
|
||||
#include "uuid.h"
|
||||
#include "wakeup.h"
|
||||
|
||||
|
||||
@@ -5,11 +5,10 @@
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "buf.h"
|
||||
#include "flow.h"
|
||||
#include "list.h"
|
||||
#include "log.h"
|
||||
#include "peer.h"
|
||||
#include "resolve.h"
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <jansson.h>
|
||||
|
||||
#include "hex.h"
|
||||
#include "buf.h"
|
||||
#include "log.h"
|
||||
#include "packet.h"
|
||||
#include "rand.h"
|
||||
#include "receive.h"
|
||||
#include "send.h"
|
||||
#include "server.h"
|
||||
#include "uuid.h"
|
||||
|
||||
#include "json.h"
|
||||
|
||||
@@ -79,11 +79,11 @@ static bool json_parse_header(json_t *in, struct packet *packet, struct json_par
|
||||
}
|
||||
|
||||
if (!strcmp(json_server_id, (const char *) server_id)) {
|
||||
fprintf(stderr, "R %s: Attempt to receive json data from our own server ID (%s); loop!\n", packet->source_id, server_id);
|
||||
log_write('R', packet->source_id, "Attempt to receive json data from our own server ID (%s); loop!", server_id);
|
||||
return false;
|
||||
}
|
||||
|
||||
fprintf(stderr, "R %s: Connected to server ID: %s\n", packet->source_id, json_server_id);
|
||||
log_write('R', packet->source_id, "Connected to server ID: %s", json_server_id);
|
||||
|
||||
state->mlat_timestamp_mhz = (uint16_t) mlat_timestamp_mhz;
|
||||
state->mlat_timestamp_max = (uint64_t) mlat_timestamp_max;
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "list.h"
|
||||
|
||||
void list_head_init(struct list_head *head) {
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wcast-align"
|
||||
#pragma GCC diagnostic ignored "-Wgnu-statement-expression"
|
||||
#pragma GCC diagnostic ignored "-Wlanguage-extension-token"
|
||||
|
||||
#define offset_of(type, member) ((size_t) &((type *) NULL)->member)
|
||||
|
||||
#define container_of(ptr, type, member) ({ \
|
||||
typeof( ((type *) NULL)->member ) *__mptr = (ptr); \
|
||||
(type *)( (char *)__mptr - offset_of(type, member) );})
|
||||
(type *)( (char *)__mptr - offsetof(type, member) );})
|
||||
|
||||
struct list_head {
|
||||
struct list_head *next;
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "exec.h"
|
||||
|
||||
@@ -3,17 +3,16 @@
|
||||
#include <netdb.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "buf.h"
|
||||
#include "flow.h"
|
||||
#include "list.h"
|
||||
#include "log.h"
|
||||
#include "peer.h"
|
||||
#include "resolve.h"
|
||||
#include "socket.h"
|
||||
#include "wakeup.h"
|
||||
#include "uuid.h"
|
||||
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/epoll.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "log.h"
|
||||
#include "server.h"
|
||||
#include "uuid.h"
|
||||
#include "wakeup.h"
|
||||
|
||||
#include "peer.h"
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
#pragma GCC diagnostic ignored "-Wcast-qual"
|
||||
#pragma GCC diagnostic ignored "-Wpacked"
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "buf.h"
|
||||
#include "log.h"
|
||||
#include "packet.h"
|
||||
#include "server.h"
|
||||
#include "uuid.h"
|
||||
|
||||
#include "adsb.pb-c.h"
|
||||
#include "proto.h"
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wcast-qual"
|
||||
#pragma GCC diagnostic ignored "-Wpacked"
|
||||
|
||||
#define PROTO_MAGIC "aDsB"
|
||||
|
||||
struct proto_parser_state {
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "buf.h"
|
||||
#include "hex.h"
|
||||
#include "packet.h"
|
||||
#include "uuid.h"
|
||||
|
||||
#include "raw.h"
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "airspy_adsb.h"
|
||||
@@ -12,7 +11,6 @@
|
||||
#include "buf.h"
|
||||
#include "flow.h"
|
||||
#include "json.h"
|
||||
#include "list.h"
|
||||
#include "log.h"
|
||||
#include "packet.h"
|
||||
#include "peer.h"
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netdb.h>
|
||||
|
||||
#include "asyncaddrinfo.h"
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <strings.h>
|
||||
@@ -15,7 +13,6 @@
|
||||
#include "buf.h"
|
||||
#include "flow.h"
|
||||
#include "json.h"
|
||||
#include "list.h"
|
||||
#include "log.h"
|
||||
#include "packet.h"
|
||||
#include "peer.h"
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
#include <assert.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "flow.h"
|
||||
#include "list.h"
|
||||
#include "log.h"
|
||||
#include "peer.h"
|
||||
#include "receive.h"
|
||||
#include "send.h"
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
#include <errno.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "socket.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include "hex.h"
|
||||
#include "rand.h"
|
||||
|
||||
|
||||
@@ -1,15 +1,8 @@
|
||||
#include <assert.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <sys/epoll.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "list.h"
|
||||
#include "peer.h"
|
||||
#include "rand.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user