diff --git a/include/user/netctl.h b/include/user/netctl.h index 2e69104..c582383 100644 --- a/include/user/netctl.h +++ b/include/user/netctl.h @@ -2,3 +2,8 @@ #define NETCTL_SET_INADDR 0x0001 #define NETCTL_GET_INADDR 0x0002 + +#if !defined(__KERNEL__) +#include +int netctl(const char *iface, uint32_t cmd, void *arg); +#endif diff --git a/include/user/reboot.h b/include/user/reboot.h index 0ccd164..cf77781 100644 --- a/include/user/reboot.h +++ b/include/user/reboot.h @@ -8,5 +8,8 @@ #define YGG_REBOOT_MAGIC2 0x818471ED #if defined(__KERNEL__) +// TODO: move to kernel-only header void system_power_cmd(unsigned int cmd); +#else +int reboot(int magic1, int magic2, unsigned int cmd, void *arg); #endif diff --git a/include/user/socket.h b/include/user/socket.h index c675d41..b81b66e 100644 --- a/include/user/socket.h +++ b/include/user/socket.h @@ -21,3 +21,5 @@ struct sockaddr { uint16_t sa_family; char __pad[SA_MAX_SIZE - sizeof(uint16_t)]; } __attribute__((packed)); + +typedef size_t socklen_t;