mirror of https://github.com/ipxe/ipxe.git
[dhcp] Remove obsolete dhcp() function
All functionality provided by dhcp() has now been obviated by the more generic ifconf(). Signed-off-by: Michael Brown <mcb30@ipxe.org>pull/17/head
parent
452fb2d0a2
commit
c99f9ee9df
|
@ -11,7 +11,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
||||||
|
|
||||||
struct net_device;
|
struct net_device;
|
||||||
|
|
||||||
extern int dhcp ( struct net_device *netdev );
|
|
||||||
extern int pxebs ( struct net_device *netdev, unsigned int pxe_type );
|
extern int pxebs ( struct net_device *netdev, unsigned int pxe_type );
|
||||||
|
|
||||||
#endif /* _USR_DHCPMGMT_H */
|
#endif /* _USR_DHCPMGMT_H */
|
||||||
|
|
|
@ -25,39 +25,15 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
||||||
#include <ipxe/netdevice.h>
|
#include <ipxe/netdevice.h>
|
||||||
#include <ipxe/dhcp.h>
|
#include <ipxe/dhcp.h>
|
||||||
#include <ipxe/monojob.h>
|
#include <ipxe/monojob.h>
|
||||||
#include <ipxe/timer.h>
|
|
||||||
#include <usr/ifmgmt.h>
|
#include <usr/ifmgmt.h>
|
||||||
#include <usr/dhcpmgmt.h>
|
#include <usr/dhcpmgmt.h>
|
||||||
|
|
||||||
/** Default time to wait for link-up */
|
|
||||||
#define LINK_WAIT_TIMEOUT ( 15 * TICKS_PER_SEC )
|
|
||||||
|
|
||||||
/** @file
|
/** @file
|
||||||
*
|
*
|
||||||
* DHCP management
|
* DHCP management
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int dhcp ( struct net_device *netdev ) {
|
|
||||||
int rc;
|
|
||||||
|
|
||||||
/* Check we can open the interface first */
|
|
||||||
if ( ( rc = ifopen ( netdev ) ) != 0 )
|
|
||||||
return rc;
|
|
||||||
|
|
||||||
/* Wait for link-up */
|
|
||||||
if ( ( rc = iflinkwait ( netdev, LINK_WAIT_TIMEOUT ) ) != 0 )
|
|
||||||
return rc;
|
|
||||||
|
|
||||||
/* Perform DHCP */
|
|
||||||
printf ( "DHCP (%s %s)", netdev->name,
|
|
||||||
netdev->ll_protocol->ntoa ( netdev->ll_addr ) );
|
|
||||||
if ( ( rc = start_dhcp ( &monojob, netdev ) ) == 0 )
|
|
||||||
rc = monojob_wait ( "", 0 );
|
|
||||||
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
int pxebs ( struct net_device *netdev, unsigned int pxe_type ) {
|
int pxebs ( struct net_device *netdev, unsigned int pxe_type ) {
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue