Sfoglia il codice sorgente

Remove the static IP address hack from netdevice.c, and change the

default test to the DHCP test.
tags/v0.9.3
Michael Brown 18 anni fa
parent
commit
e74e20cb55
2 ha cambiato i file con 1 aggiunte e 21 eliminazioni
  1. 1
    1
      src/core/main.c
  2. 0
    20
      src/net/netdevice.c

+ 1
- 1
src/core/main.c Vedi File

@@ -154,7 +154,7 @@ int main ( void ) {
154 154
 
155 155
 	netdev = next_netdev ();
156 156
 	if ( netdev ) {
157
-		test_aoeboot ( netdev );
157
+		test_dhcp ( netdev );
158 158
 	} else {
159 159
 		printf ( "No network device found\n" );
160 160
 	}

+ 0
- 20
src/net/netdevice.c Vedi File

@@ -41,10 +41,6 @@ static struct net_protocol net_protocols_end[0] __table_end ( net_protocols );
41 41
 /** List of network devices */
42 42
 static LIST_HEAD ( net_devices );
43 43
 
44
-#warning "Remove this static IP address hack"
45
-#include <ip.h>
46
-#include <gpxe/ip.h>
47
-
48 44
 /**
49 45
  * Transmit raw packet via network device
50 46
  *
@@ -179,19 +175,6 @@ struct net_device * alloc_netdev ( size_t priv_size ) {
179 175
  */
180 176
 int register_netdev ( struct net_device *netdev ) {
181 177
 	
182
-#warning "Remove this static IP address hack"
183
-	{
184
-		const struct in_addr static_address = { htonl ( 0x0afefe01 ) };
185
-		const struct in_addr static_netmask = { htonl ( 0xffffff00 ) };
186
-		const struct in_addr static_gateway = { INADDR_NONE };
187
-		int rc;
188
-		
189
-		if ( ( rc = add_ipv4_address ( netdev, static_address,
190
-					       static_netmask,
191
-					       static_gateway ) ) != 0 )
192
-			return rc;
193
-	}
194
-
195 178
 	/* Add to device list */
196 179
 	list_add_tail ( &netdev->list, &net_devices );
197 180
 	DBG ( "%s registered\n", netdev_name ( netdev ) );
@@ -209,9 +192,6 @@ int register_netdev ( struct net_device *netdev ) {
209 192
 void unregister_netdev ( struct net_device *netdev ) {
210 193
 	struct pk_buff *pkb;
211 194
 
212
-#warning "Remove this static IP address hack"
213
-	del_ipv4_address ( netdev );
214
-
215 195
 	/* Discard any packets in the RX queue */
216 196
 	while ( ( pkb = netdev_rx_dequeue ( netdev ) ) ) {
217 197
 		DBG ( "%s discarding %p+%zx\n", netdev_name ( netdev ),

Loading…
Annulla
Salva