route.h 643 B

1234567891011121314151617181920212223242526272829
  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_gateway; /* the gateway address */
  14. struct sockaddr rt_genmask; /* the target network mask */
  15. unsigned short int rt_flags;
  16. char* rt_dev;
  17. /* FIXME: complete the struct */
  18. };
  19. #define RTF_UP 0x1 /* do not delete the route */
  20. #define RTF_GATEWAY 0x2 /* the route is a gateway and not an end host */
  21. #ifdef __cplusplus
  22. }
  23. #endif