blob: f09a820056e943a1a58561d413f1555d893ee506 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
//
// Created by Keuin on 2021/12/30.
//
#ifndef NETMON_VALIDATE_H
#define NETMON_VALIDATE_H
#include <stdlib.h>
int is_valid_ipv4(const char *s);
#define NOTNULL(ptr) do { \
if ((ptr) == NULL) { \
fprintf(stderr, "NotNull check failed: "#ptr " is null. (" __FILE__ ":%d)\n", __LINE__); \
abort(); \
} } while(0)
#endif //NETMON_VALIDATE_H
|