Browse Source

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 years ago
parent
commit
e74e20cb55
2 changed files with 1 additions and 21 deletions
  1. 1
    1
      src/core/main.c
  2. 0
    20
      src/net/netdevice.c

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

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

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

41
 /** List of network devices */
41
 /** List of network devices */
42
 static LIST_HEAD ( net_devices );
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
  * Transmit raw packet via network device
45
  * Transmit raw packet via network device
50
  *
46
  *
179
  */
175
  */
180
 int register_netdev ( struct net_device *netdev ) {
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
 	/* Add to device list */
178
 	/* Add to device list */
196
 	list_add_tail ( &netdev->list, &net_devices );
179
 	list_add_tail ( &netdev->list, &net_devices );
197
 	DBG ( "%s registered\n", netdev_name ( netdev ) );
180
 	DBG ( "%s registered\n", netdev_name ( netdev ) );
209
 void unregister_netdev ( struct net_device *netdev ) {
192
 void unregister_netdev ( struct net_device *netdev ) {
210
 	struct pk_buff *pkb;
193
 	struct pk_buff *pkb;
211
 
194
 
212
-#warning "Remove this static IP address hack"
213
-	del_ipv4_address ( netdev );
214
-
215
 	/* Discard any packets in the RX queue */
195
 	/* Discard any packets in the RX queue */
216
 	while ( ( pkb = netdev_rx_dequeue ( netdev ) ) ) {
196
 	while ( ( pkb = netdev_rx_dequeue ( netdev ) ) ) {
217
 		DBG ( "%s discarding %p+%zx\n", netdev_name ( netdev ),
197
 		DBG ( "%s discarding %p+%zx\n", netdev_name ( netdev ),

Loading…
Cancel
Save