aboutsummaryrefslogtreecommitdiffstats
path: root/pingu_gateway.h
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-08-05 12:56:16 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2011-08-05 13:02:48 +0200
commitb0e778e4b6c39b50b697d049baea2a074a16b189 (patch)
tree337d47407488aa84369dc38cd95f8577021861c5 /pingu_gateway.h
parent8ef18a61f70a63bdbf8fb1ecbf8ab34a7f287663 (diff)
downloadpingu-b0e778e4b6c39b50b697d049baea2a074a16b189.tar.bz2
pingu-b0e778e4b6c39b50b697d049baea2a074a16b189.tar.xz
pingu_gateway: cleanup. split out gateway funcs
To make code cleaner we move all gateway functions to separate file and rename a few functions.
Diffstat (limited to 'pingu_gateway.h')
-rw-r--r--pingu_gateway.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/pingu_gateway.h b/pingu_gateway.h
new file mode 100644
index 0000000..62c576b
--- /dev/null
+++ b/pingu_gateway.h
@@ -0,0 +1,29 @@
+#ifndef PINGU_GATEWAY_H
+#define PINGU_GATEWAY_H
+
+#include "list.h"
+#include "sockaddr_util.h"
+
+struct pingu_gateway {
+ 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 gateway_list_entry;
+};
+
+void pingu_gateway_del_all(struct list_head *head);
+void pingu_gateway_add(struct list_head *gateway_list,
+ struct pingu_gateway *gw);
+void pingu_gateway_del(struct list_head *gateway_list,
+ struct pingu_gateway *gw);
+
+
+
+#endif