route.h 517 B

1234567891011121314151617181920
  1. /*
  2. * Copyright (c) 2020, Marios Prokopakis <mariosprokopakis@gmail.com>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <sys/socket.h>
  8. struct rtentry {
  9. struct sockaddr rt_gateway; /* the gateway address */
  10. struct sockaddr rt_genmask; /* the target network mask */
  11. unsigned short int rt_flags;
  12. char* rt_dev;
  13. /* FIXME: complete the struct */
  14. };
  15. #define RTF_UP 0x1 /* do not delete the route */
  16. #define RTF_GATEWAY 0x2 /* the route is a gateway and not an end host */