summaryrefslogtreecommitdiffstats
path: root/src/proto
diff options
context:
space:
mode:
Diffstat (limited to 'src/proto')
-rw-r--r--src/proto/ip.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/proto/ip.c b/src/proto/ip.c
index 3f46377c..a0f36d74 100644
--- a/src/proto/ip.c
+++ b/src/proto/ip.c
@@ -32,6 +32,34 @@ void set_ipaddr ( struct in_addr address ) {
}
/**
+ * Set netmask
+ *
+ */
+void set_netmask ( struct in_addr address ) {
+ union {
+ struct in_addr address;
+ uint16_t uip_address[2];
+ } u;
+
+ u.address = address;
+ uip_setnetmask ( u.uip_address );
+}
+
+/**
+ * Set default gateway
+ *
+ */
+void set_gateway ( struct in_addr address ) {
+ union {
+ struct in_addr address;
+ uint16_t uip_address[2];
+ } u;
+
+ u.address = address;
+ uip_setdraddr ( u.uip_address );
+}
+
+/**
* Initialise TCP/IP stack
*
*/