mirror of
https://github.com/bol-van/zapret.git
synced 2025-12-19 22:18:13 +03:00
Use byte-per-byte accesses when accessing possibly unaligned data.
This commit is contained in:
@@ -27,3 +27,7 @@ bool is_private6(const struct sockaddr_in6* a);
|
||||
|
||||
int set_keepalive(int fd);
|
||||
int get_so_error(int fd);
|
||||
|
||||
static inline uint16_t pntoh16(const uint8_t *p) {
|
||||
return ((uint16_t)p[0] << 8) | (uint16_t)p[1];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user