Browse Source

Remove _PROTOCOL macros for gcc 3.2 compatibility

tags/v0.9.3
Marty Connor 18 years ago
parent
commit
ee9ae8130a
9 changed files with 17 additions and 55 deletions
  1. 4
    14
      src/include/gpxe/netdevice.h
  2. 4
    14
      src/include/gpxe/tcpip.h
  3. 1
    3
      src/net/aoe.c
  4. 1
    3
      src/net/arp.c
  5. 1
    3
      src/net/ethernet.c
  6. 2
    6
      src/net/ipv4.c
  7. 2
    6
      src/net/ipv6.c
  8. 1
    3
      src/net/tcp.c
  9. 1
    3
      src/net/udp.c

+ 4
- 14
src/include/gpxe/netdevice.h View File

176
 	void *priv;
176
 	void *priv;
177
 };
177
 };
178
 
178
 
179
-/**
180
- * Register a link-layer protocol
181
- *
182
- * @v protocol		Link-layer protocol
183
- */
184
-#define LL_PROTOCOL( protocol ) \
185
-	struct ll_protocol protocol __table ( ll_protocols, 01 )
179
+/** Declare a link-layer protocol */
180
+#define __ll_protocol  __table ( ll_protocols, 01 )
186
 
181
 
187
-/**
188
- * Register a network-layer protocol
189
- *
190
- * @v protocol		Network-layer protocol
191
- */
192
-#define NET_PROTOCOL( protocol ) \
193
-	struct net_protocol protocol __table ( net_protocols, 01 )
182
+/** Declare a network-layer protocol */
183
+#define __net_protocol __table ( net_protocols, 01 )
194
 
184
 
195
 /**
185
 /**
196
  * Get network device name
186
  * Get network device name

+ 4
- 14
src/include/gpxe/tcpip.h View File

94
 		       struct sockaddr_tcpip *st_dest );
94
 		       struct sockaddr_tcpip *st_dest );
95
 };
95
 };
96
 
96
 
97
-/**
98
- * Register a TCP/IP transport-layer protocol
99
- *
100
- * @v protocol		Transport-layer protocol
101
- */
102
-#define TCPIP_PROTOCOL( protocol ) \
103
-	struct tcpip_protocol protocol __table ( tcpip_protocols, 01 )
97
+/** Declare a TCP/IP transport-layer protocol */
98
+#define	__tcpip_protocol __table ( tcpip_protocols, 01 )
104
 
99
 
105
-/**
106
- * Register a TCP/IP network-layer protocol
107
- *
108
- * @v protocol		Network-layer protocol
109
- */
110
-#define TCPIP_NET_PROTOCOL( protocol ) \
111
-	struct tcpip_net_protocol protocol __table ( tcpip_net_protocols, 01 )
100
+/** Declare a TCP/IP network-layer protocol */
101
+#define	__tcpip_net_protocol __table ( tcpip_net_protocols, 01 )
112
 
102
 
113
 extern int tcpip_rx ( struct pk_buff *pkb, uint8_t tcpip_proto,
103
 extern int tcpip_rx ( struct pk_buff *pkb, uint8_t tcpip_proto,
114
 		      struct sockaddr_tcpip *st_src,
104
 		      struct sockaddr_tcpip *st_src,

+ 1
- 3
src/net/aoe.c View File

253
 }
253
 }
254
 
254
 
255
 /** AoE protocol */
255
 /** AoE protocol */
256
-struct net_protocol aoe_protocol = {
256
+struct net_protocol aoe_protocol __net_protocol = {
257
 	.name = "AoE",
257
 	.name = "AoE",
258
 	.net_proto = htons ( ETH_P_AOE ),
258
 	.net_proto = htons ( ETH_P_AOE ),
259
 	.rx = aoe_rx,
259
 	.rx = aoe_rx,
260
 };
260
 };
261
 
261
 
262
-NET_PROTOCOL ( aoe_protocol );
263
-
264
 /**
262
 /**
265
  * Open AoE session
263
  * Open AoE session
266
  *
264
  *

+ 1
- 3
src/net/arp.c View File

287
 }
287
 }
288
 
288
 
289
 /** ARP protocol */
289
 /** ARP protocol */
290
-struct net_protocol arp_protocol = {
290
+struct net_protocol arp_protocol __net_protocol = {
291
 	.name = "ARP",
291
 	.name = "ARP",
292
 	.net_proto = htons ( ETH_P_ARP ),
292
 	.net_proto = htons ( ETH_P_ARP ),
293
 	.rx = arp_rx,
293
 	.rx = arp_rx,
294
 	.ntoa = arp_ntoa,
294
 	.ntoa = arp_ntoa,
295
 };
295
 };
296
-
297
-NET_PROTOCOL ( arp_protocol );

+ 1
- 3
src/net/ethernet.c View File

104
 }
104
 }
105
 
105
 
106
 /** Ethernet protocol */
106
 /** Ethernet protocol */
107
-struct ll_protocol ethernet_protocol = {
107
+struct ll_protocol ethernet_protocol __ll_protocol = {
108
 	.name		= "Ethernet",
108
 	.name		= "Ethernet",
109
 	.ll_proto	= htons ( ARPHRD_ETHER ),
109
 	.ll_proto	= htons ( ARPHRD_ETHER ),
110
 	.ll_addr_len	= ETH_ALEN,
110
 	.ll_addr_len	= ETH_ALEN,
113
 	.rx		= eth_rx,
113
 	.rx		= eth_rx,
114
 	.ntoa		= eth_ntoa,
114
 	.ntoa		= eth_ntoa,
115
 };
115
 };
116
-
117
-LL_PROTOCOL ( ethernet_protocol );

+ 2
- 6
src/net/ipv4.c View File

499
 }
499
 }
500
 
500
 
501
 /** IPv4 protocol */
501
 /** IPv4 protocol */
502
-struct net_protocol ipv4_protocol = {
502
+struct net_protocol ipv4_protocol __net_protocol = {
503
 	.name = "IP",
503
 	.name = "IP",
504
 	.net_proto = htons ( ETH_P_IP ),
504
 	.net_proto = htons ( ETH_P_IP ),
505
 	.net_addr_len = sizeof ( struct in_addr ),
505
 	.net_addr_len = sizeof ( struct in_addr ),
507
 	.ntoa = ipv4_ntoa,
507
 	.ntoa = ipv4_ntoa,
508
 };
508
 };
509
 
509
 
510
-NET_PROTOCOL ( ipv4_protocol );
511
-
512
 /** IPv4 TCPIP net protocol */
510
 /** IPv4 TCPIP net protocol */
513
-struct tcpip_net_protocol ipv4_tcpip_protocol = {
511
+struct tcpip_net_protocol ipv4_tcpip_protocol __tcpip_net_protocol = {
514
 	.name = "IPv4",
512
 	.name = "IPv4",
515
 	.sa_family = AF_INET,
513
 	.sa_family = AF_INET,
516
 	.tx = ipv4_tx,
514
 	.tx = ipv4_tx,
517
 };
515
 };
518
 
516
 
519
-TCPIP_NET_PROTOCOL ( ipv4_tcpip_protocol );
520
-
521
 /** IPv4 ARP protocol */
517
 /** IPv4 ARP protocol */
522
 struct arp_net_protocol ipv4_arp_protocol __arp_net_protocol = {
518
 struct arp_net_protocol ipv4_arp_protocol __arp_net_protocol = {
523
 	.net_protocol = &ipv4_protocol,
519
 	.net_protocol = &ipv4_protocol,

+ 2
- 6
src/net/ipv6.c View File

35
 }
35
 }
36
 
36
 
37
 /** IPv6 protocol */
37
 /** IPv6 protocol */
38
-struct net_protocol ipv6_protocol = {
38
+struct net_protocol ipv6_protocol __net_protocol = {
39
 	.name = "IP6",
39
 	.name = "IP6",
40
 	.net_proto = htons ( ETH_P_IPV6 ),
40
 	.net_proto = htons ( ETH_P_IPV6 ),
41
 	.net_addr_len = sizeof ( struct in6_addr ),
41
 	.net_addr_len = sizeof ( struct in6_addr ),
43
 	.ntoa = ipv6_ntoa,
43
 	.ntoa = ipv6_ntoa,
44
 };
44
 };
45
 
45
 
46
-NET_PROTOCOL ( ipv6_protocol );
47
-
48
 /** IPv6 TCPIP net protocol */
46
 /** IPv6 TCPIP net protocol */
49
-struct tcpip_net_protocol ipv6_tcpip_protocol = {
47
+struct tcpip_net_protocol ipv6_tcpip_protocol __tcpip_net_protocol = {
50
 	.name = "IPv6",
48
 	.name = "IPv6",
51
 	.sa_family = AF_INET6,
49
 	.sa_family = AF_INET6,
52
 	.tx = ipv6_tx,
50
 	.tx = ipv6_tx,
53
 };
51
 };
54
-
55
-TCPIP_NET_PROTOCOL ( ipv6_tcpip_protocol );

+ 1
- 3
src/net/tcp.c View File

922
 }
922
 }
923
 
923
 
924
 /** TCP protocol */
924
 /** TCP protocol */
925
-struct tcpip_protocol tcp_protocol = {
925
+struct tcpip_protocol tcp_protocol __tcpip_protocol = {
926
 	.name = "TCP",
926
 	.name = "TCP",
927
 	.rx = tcp_rx,
927
 	.rx = tcp_rx,
928
 	.tcpip_proto = IP_TCP,
928
 	.tcpip_proto = IP_TCP,
929
 	.csum_offset = 16,
929
 	.csum_offset = 16,
930
 };
930
 };
931
 
931
 
932
-TCPIP_PROTOCOL ( tcp_protocol );
933
-
934
 #endif /* USE_UIP */
932
 #endif /* USE_UIP */

+ 1
- 3
src/net/udp.c View File

267
 	return rc;
267
 	return rc;
268
 }
268
 }
269
 
269
 
270
-struct tcpip_protocol udp_protocol  = {
270
+struct tcpip_protocol udp_protocol __tcpip_protocol = {
271
 	.name = "UDP",
271
 	.name = "UDP",
272
 	.rx = udp_rx,
272
 	.rx = udp_rx,
273
 	.tcpip_proto = IP_UDP,
273
 	.tcpip_proto = IP_UDP,
274
 	.csum_offset = 6,
274
 	.csum_offset = 6,
275
 };
275
 };
276
-
277
-TCPIP_PROTOCOL ( udp_protocol );

Loading…
Cancel
Save