瀏覽代碼

Renamed trans_{rx,tx}() to tcpip_{rx,tx}(), since they are specific to

the TCP/IP protocol suite (rather than being general transport-layer
functions).
tags/v0.9.3
Michael Brown 19 年之前
父節點
當前提交
1ebb68e49a
共有 4 個檔案被更改,包括 6 行新增6 行删除
  1. 2
    2
      src/include/gpxe/tcpip.h
  2. 1
    1
      src/net/ipv4.c
  3. 2
    2
      src/net/tcpip.c
  4. 1
    1
      src/net/udp.c

+ 2
- 2
src/include/gpxe/tcpip.h 查看文件

77
 #define TCPIP_NET_PROTOCOL( protocol ) \
77
 #define TCPIP_NET_PROTOCOL( protocol ) \
78
         struct tcpip_net_protocol protocol __table ( tcpip_net_protocols, 01 )
78
         struct tcpip_net_protocol protocol __table ( tcpip_net_protocols, 01 )
79
 
79
 
80
-extern void trans_rx ( struct pk_buff *pkb, uint8_t trans_proto, 
80
+extern void tcpip_rx ( struct pk_buff *pkb, uint8_t trans_proto, 
81
 		       struct in_addr *src, struct in_addr *dest );
81
 		       struct in_addr *src, struct in_addr *dest );
82
 
82
 
83
-extern int trans_tx ( struct pk_buff *pkb, struct tcpip_protocol *tcpip, 
83
+extern int tcpip_tx ( struct pk_buff *pkb, struct tcpip_protocol *tcpip, 
84
 		      struct sockaddr *dest );
84
 		      struct sockaddr *dest );
85
 
85
 
86
 extern unsigned int tcpip_continue_chksum ( unsigned int partial,
86
 extern unsigned int tcpip_continue_chksum ( unsigned int partial,

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

546
 	pkb_pull ( pkb, sizeof ( *iphdr ) );
546
 	pkb_pull ( pkb, sizeof ( *iphdr ) );
547
 
547
 
548
 	/* Send it to the transport layer */
548
 	/* Send it to the transport layer */
549
-	trans_rx ( pkb, iphdr->protocol, src, dest );
549
+	tcpip_rx ( pkb, iphdr->protocol, src, dest );
550
 }
550
 }
551
 
551
 
552
 /** 
552
 /** 

+ 2
- 2
src/net/tcpip.c 查看文件

70
  *
70
  *
71
  * This function expects a transport-layer segment from the network-layer
71
  * This function expects a transport-layer segment from the network-layer
72
  */
72
  */
73
-void trans_rx ( struct pk_buff *pkb, uint8_t trans_proto, struct in_addr *src,
73
+void tcpip_rx ( struct pk_buff *pkb, uint8_t trans_proto, struct in_addr *src,
74
 		struct in_addr *dest ) {
74
 		struct in_addr *dest ) {
75
 	struct tcpip_protocol *tcpip;
75
 	struct tcpip_protocol *tcpip;
76
 
76
 
90
  * @v sock		Destination socket address
90
  * @v sock		Destination socket address
91
  * @ret			Status
91
  * @ret			Status
92
  */
92
  */
93
-int trans_tx ( struct pk_buff *pkb, struct tcpip_protocol *tcpip,
93
+int tcpip_tx ( struct pk_buff *pkb, struct tcpip_protocol *tcpip,
94
 	       struct sockaddr *sock ) {
94
 	       struct sockaddr *sock ) {
95
 
95
 
96
 	/* Identify the network layer protocol and send it using xxx_tx() */
96
 	/* Identify the network layer protocol and send it using xxx_tx() */

+ 1
- 1
src/net/udp.c 查看文件

151
 	udp_dump ( udphdr );
151
 	udp_dump ( udphdr );
152
 
152
 
153
 	/* Send it to the next layer for processing */
153
 	/* Send it to the next layer for processing */
154
-	return trans_tx ( conn->tx_pkb, &udp_protocol, peer );
154
+	return tcpip_tx ( conn->tx_pkb, &udp_protocol, peer );
155
 }
155
 }
156
 
156
 
157
 /**
157
 /**

Loading…
取消
儲存