diff options
Diffstat (limited to 'inc')
-rw-r--r-- | inc/handlers.h | 7 | ||||
-rw-r--r-- | inc/netascii.h | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/inc/handlers.h b/inc/handlers.h index c174b6a..6be05da 100644 --- a/inc/handlers.h +++ b/inc/handlers.h @@ -4,9 +4,12 @@ #include <netinet/in.h> #include "packet.h" +#define NBD_NBTPD_ARGS_PATH_MAX 768 +#define NBD_NBTPD_ARGS_MODE_MAX 32 + typedef struct { - char path[768]; - char mode[32]; + char path[NBD_NBTPD_ARGS_PATH_MAX]; + char mode[NBD_NBTPD_ARGS_MODE_MAX]; nbd_tftp_ecode err; struct sockaddr_in client; } nbd_nbtpd_args; diff --git a/inc/netascii.h b/inc/netascii.h index ada2051..ae80bae 100644 --- a/inc/netascii.h +++ b/inc/netascii.h @@ -1,9 +1,10 @@ #ifndef NBD_NETASCII_H #define NBD_NETASCII_H #include <stdint.h> +#include <stdlib.h> uint8_t is_netascii_char(char c); uint8_t is_netascii_str(char *str); -uint8_t is_netascii_buf(char *buf, uint64_t len); +uint8_t is_netascii_buf(char *buf, size_t len); #endif |