瀏覽代碼

Split ipv6 functions out from ipv4.c

tags/v0.9.3
Michael Brown 18 年之前
父節點
當前提交
e517a4771b
共有 2 個文件被更改,包括 24 次插入18 次删除
  1. 0
    18
      src/net/ipv4.c
  2. 24
    0
      src/net/ipv6.c

+ 0
- 18
src/net/ipv4.c 查看文件

@@ -318,16 +318,6 @@ int ipv4_tx ( struct pk_buff *pkb, uint16_t trans_proto, struct in_addr *dest )
318 318
 	return rc;
319 319
 }
320 320
 
321
-/**
322
- * Transmit IP6 packets
323
- * 
324
- * Placeholder to allow linking. The function should be placed in net/ipv6.c
325
- */
326
-int ipv6_tx ( struct pk_buff *pkb __unused, uint16_t trans_proto __unused, struct in6_addr *dest __unused) {
327
-	return -ENOSYS;
328
-}
329
-
330
-
331 321
 /**
332 322
  * Process incoming IP packets
333 323
  *
@@ -363,14 +353,6 @@ static int ipv4_uip_rx ( struct pk_buff *pkb,
363 353
 	return 0;
364 354
 }
365 355
 
366
-/**
367
- * Process incoming IP6 packets
368
- * 
369
- * Placeholder function. Should rewrite in net/ipv6.c
370
- */
371
-void ipv6_rx ( struct pk_buff *pkb __unused, struct net_device *netdev __unused, const void *ll_source __unused ) {
372
-}
373
-
374 356
 /**
375 357
  * Process incoming packets (without uIP)
376 358
  *

+ 24
- 0
src/net/ipv6.c 查看文件

@@ -0,0 +1,24 @@
1
+#include <errno.h>
2
+#include <gpxe/pkbuff.h>
3
+#include <gpxe/netdevice.h>
4
+#include <gpxe/in.h>
5
+
6
+/**
7
+ * Transmit IP6 packets
8
+ *
9
+ * Placeholder to allow linking. The function should be placed in net/ipv6.c
10
+ */
11
+int ipv6_tx ( struct pk_buff *pkb __unused, uint16_t trans_proto __unused,
12
+	      struct in6_addr *dest __unused) {
13
+	return -ENOSYS;
14
+}
15
+
16
+/**
17
+ * Process incoming IP6 packets
18
+ *
19
+ * Placeholder function. Should rewrite in net/ipv6.c
20
+ */
21
+void ipv6_rx ( struct pk_buff *pkb __unused,
22
+	       struct net_device *netdev __unused,
23
+	       const void *ll_source __unused ) {
24
+}

Loading…
取消
儲存