trafgen: fix NULL pointer dereference in -i option parsing
[netsniff-ng-new.git] / ioops.h
blob955693044ed9d31dc864d63c66b86cb45c0c307a
1 #ifndef IOOPS_H
2 #define IOOPS_H
4 #include <sys/types.h>
6 extern int open_or_die(const char *file, int flags);
7 extern int open_or_die_m(const char *file, int flags, mode_t mode);
8 extern int dup_or_die(int oldfd);
9 extern void dup2_or_die(int oldfd, int newfd);
10 extern void create_or_die(const char *file, mode_t mode);
11 extern int mkostemp_or_die(char *templ, int flags);
12 extern int tun_open_or_die(const char *name, int type);
13 extern void pipe_or_die(int pipefd[2], int flags);
14 extern ssize_t read_or_die(int fd, void *buf, size_t count);
15 extern ssize_t write_or_die(int fd, const void *buf, size_t count);
16 extern int read_blob_or_die(const char *file, void *blob, size_t count);
17 extern int write_blob_or_die(const char *file, const void *blob, size_t count);
19 #endif /* IOOPS_H */