diff options
Diffstat (limited to 'pingu_route.h')
-rw-r--r-- | pingu_route.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/pingu_route.h b/pingu_route.h new file mode 100644 index 0000000..5badb10 --- /dev/null +++ b/pingu_route.h @@ -0,0 +1,30 @@ +#ifndef pingu_route_H +#define pingu_route_H + +#include "list.h" +#include "sockaddr_util.h" + +struct pingu_route { + union sockaddr_any gw_addr; + union sockaddr_any dest; + union sockaddr_any src; + unsigned char dst_len; + unsigned char src_len; + + int metric; + unsigned char protocol; + unsigned char scope; + unsigned char type; + struct list_head route_list_entry; +}; + +void pingu_route_del_all(struct list_head *head); +void pingu_route_add(struct list_head *route_list, + struct pingu_route *gw); +void pingu_route_del(struct list_head *route_list, + struct pingu_route *gw); +int is_default_gw(struct pingu_route *route); +struct pingu_route *pingu_route_first_default(struct list_head *route_list); + + +#endif |