Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ AC_ARG_ENABLE([mysql],
)

# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h netinet/in.h stdint.h stdlib.h syslog.h unistd.h])
AC_CHECK_HEADERS([arpa/inet.h netinet/in.h inttypes.h stdlib.h syslog.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
Expand Down
2 changes: 1 addition & 1 deletion src/addrwatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <limits.h>
#include <pwd.h>
#include <signal.h>
#include <stdint.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down
2 changes: 1 addition & 1 deletion src/addrwatch_stdout.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void process_entry(struct shm_log_entry *e, void *arg)
ip4_ntoa(e->ip_address, ip_str);
}

printf("%lu %s %u %s %s %s\n", e->timestamp, e->interface, e->vlan_tag,
printf("%" PRIu64 " %s %" PRIu16 " %s %s %s\n", e->timestamp, e->interface, e->vlan_tag,
mac_str, ip_str, pkt_origin_str[e->origin]);
}

Expand Down
2 changes: 1 addition & 1 deletion src/addrwatch_syslog.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ void process_entry(struct shm_log_entry *e, void *arg)
ip4_ntoa(e->ip_address, ip_str);
}

syslog(LOG_INFO, "%lu %s %u %s %s %s", e->timestamp, e->interface,
syslog(LOG_INFO, "%" PRIu64 " %s %" PRIu16 " %s %s %s", e->timestamp, e->interface,
e->vlan_tag, mac_str, ip_str, pkt_origin_str[e->origin]);
}

Expand Down
2 changes: 1 addition & 1 deletion src/base64.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define BASE64_H

#include "addrwatch.h"
#include <stdint.h>
#include <inttypes.h>

void base64_encode(const uint8_t *src, char *dst, int ssize, int dsize);
char *base64_encode_packet(struct pkt *p);
Expand Down
2 changes: 1 addition & 1 deletion src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define COMMON_H

#include <arpa/inet.h>
#include <stdint.h>
#include <inttypes.h>
#include <stdio.h>
#include <sys/socket.h>

Expand Down
2 changes: 1 addition & 1 deletion src/mcache.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <sys/types.h>
#include <netinet/if_ether.h>
#include <stdint.h>
#include <inttypes.h>

struct mcache_node {
uint8_t l2_addr[ETHER_ADDR_LEN];
Expand Down
4 changes: 2 additions & 2 deletions src/output_flatfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ void output_flatfile_reload()
void output_flatfile_save(struct pkt *p, char *mac_str, char *ip_str)
{
if (cfg.data_fd) {
fprintf(cfg.data_fd, "%lu %s %u %s %s %s\n",
p->pcap_header->ts.tv_sec, p->ifc->name, p->vlan_tag,
fprintf(cfg.data_fd, "%" PRIu64 " %s %" PRIu16 " %s %s %s\n",
(uint64_t)p->pcap_header->ts.tv_sec, p->ifc->name, p->vlan_tag,
mac_str, ip_str, pkt_origin_str[p->origin]);
fflush(cfg.data_fd);
}
Expand Down
2 changes: 1 addition & 1 deletion src/parse.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//#include <stdint.h>
//#include <inttypes.h>
//#include <stdio.h>
//#include <stdlib.h>

Expand Down
2 changes: 1 addition & 1 deletion src/shm.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <net/if.h>
#include <netinet/in.h>
#include <netinet/if_ether.h>
#include <stdint.h>
#include <inttypes.h>
#include <sys/socket.h>

#define DEFAULT_SHM_LOG_NAME "/addrwatch-shm-log"
Expand Down
2 changes: 1 addition & 1 deletion src/shm_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <fcntl.h>
#include <net/if.h>
#include <stdint.h>
#include <inttypes.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <sys/stat.h>
Expand Down
2 changes: 1 addition & 1 deletion src/storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void save_pairing(struct pkt *p)

output_shm_save(p, mac_str, ip_str);
if (!cfg.quiet) {
printf("%lu %s %u %s %s %s\n", tstamp, p->ifc->name,
printf("%" PRIu64 " %s %" PRIu16 " %s %s %s\n", (uint64_t)tstamp, p->ifc->name,
p->vlan_tag, mac_str, ip_str, pkt_origin_str[p->origin]);
fflush(stdout);
}
Expand Down
2 changes: 1 addition & 1 deletion src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "config.h"
#endif

#include <stdint.h>
#include <inttypes.h>
#include <stdio.h>

#include <syslog.h>
Expand Down