2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-14 23:31:39 +00:00

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

default test to the DHCP test.
This commit is contained in:
Michael Brown 2006-07-20 02:51:52 +00:00
parent 00a1f000b1
commit e74e20cb55
2 changed files with 1 additions and 21 deletions

View File

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

View File

@ -41,10 +41,6 @@ static struct net_protocol net_protocols_end[0] __table_end ( net_protocols );
/** List of network devices */
static LIST_HEAD ( net_devices );
#warning "Remove this static IP address hack"
#include <ip.h>
#include <gpxe/ip.h>
/**
* Transmit raw packet via network device
*
@ -179,19 +175,6 @@ struct net_device * alloc_netdev ( size_t priv_size ) {
*/
int register_netdev ( struct net_device *netdev ) {
#warning "Remove this static IP address hack"
{
const struct in_addr static_address = { htonl ( 0x0afefe01 ) };
const struct in_addr static_netmask = { htonl ( 0xffffff00 ) };
const struct in_addr static_gateway = { INADDR_NONE };
int rc;
if ( ( rc = add_ipv4_address ( netdev, static_address,
static_netmask,
static_gateway ) ) != 0 )
return rc;
}
/* Add to device list */
list_add_tail ( &netdev->list, &net_devices );
DBG ( "%s registered\n", netdev_name ( netdev ) );
@ -209,9 +192,6 @@ int register_netdev ( struct net_device *netdev ) {
void unregister_netdev ( struct net_device *netdev ) {
struct pk_buff *pkb;
#warning "Remove this static IP address hack"
del_ipv4_address ( netdev );
/* Discard any packets in the RX queue */
while ( ( pkb = netdev_rx_dequeue ( netdev ) ) ) {
DBG ( "%s discarding %p+%zx\n", netdev_name ( netdev ),