route.h 757 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (c) 2020, Marios Prokopakis <mariosprokopakis@gmail.com>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <Kernel/API/POSIX/sys/socket.h>
  8. #include <Kernel/API/POSIX/sys/types.h>
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. struct rtentry {
  13. struct sockaddr rt_dst; /* the target address */
  14. struct sockaddr rt_gateway; /* the gateway address */
  15. struct sockaddr rt_genmask; /* the target network mask */
  16. unsigned short int rt_flags;
  17. char* rt_dev;
  18. /* FIXME: complete the struct */
  19. };
  20. #define RTF_UP 0x1 /* do not delete the route */
  21. #define RTF_GATEWAY 0x2 /* the route is a gateway and not an end host */
  22. #define RTF_HOST 0x4 /* host entry (net otherwise) */
  23. #ifdef __cplusplus
  24. }
  25. #endif