Ver código fonte

[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>
tags/v1.20.1
Michael Brown 10 anos atrás
pai
commit
c99f9ee9df
2 arquivos alterados com 0 adições e 25 exclusões
  1. 0
    1
      src/include/usr/dhcpmgmt.h
  2. 0
    24
      src/usr/dhcpmgmt.c

+ 0
- 1
src/include/usr/dhcpmgmt.h Ver arquivo

11
 
11
 
12
 struct net_device;
12
 struct net_device;
13
 
13
 
14
-extern int dhcp ( struct net_device *netdev );
15
 extern int pxebs ( struct net_device *netdev, unsigned int pxe_type );
14
 extern int pxebs ( struct net_device *netdev, unsigned int pxe_type );
16
 
15
 
17
 #endif /* _USR_DHCPMGMT_H */
16
 #endif /* _USR_DHCPMGMT_H */

+ 0
- 24
src/usr/dhcpmgmt.c Ver arquivo

25
 #include <ipxe/netdevice.h>
25
 #include <ipxe/netdevice.h>
26
 #include <ipxe/dhcp.h>
26
 #include <ipxe/dhcp.h>
27
 #include <ipxe/monojob.h>
27
 #include <ipxe/monojob.h>
28
-#include <ipxe/timer.h>
29
 #include <usr/ifmgmt.h>
28
 #include <usr/ifmgmt.h>
30
 #include <usr/dhcpmgmt.h>
29
 #include <usr/dhcpmgmt.h>
31
 
30
 
32
-/** Default time to wait for link-up */
33
-#define LINK_WAIT_TIMEOUT ( 15 * TICKS_PER_SEC )
34
-
35
 /** @file
31
 /** @file
36
  *
32
  *
37
  * DHCP management
33
  * DHCP management
38
  *
34
  *
39
  */
35
  */
40
 
36
 
41
-int dhcp ( struct net_device *netdev ) {
42
-	int rc;
43
-
44
-	/* Check we can open the interface first */
45
-	if ( ( rc = ifopen ( netdev ) ) != 0 )
46
-		return rc;
47
-
48
-	/* Wait for link-up */
49
-	if ( ( rc = iflinkwait ( netdev, LINK_WAIT_TIMEOUT ) ) != 0 )
50
-		return rc;
51
-
52
-	/* Perform DHCP */
53
-	printf ( "DHCP (%s %s)", netdev->name,
54
-		 netdev->ll_protocol->ntoa ( netdev->ll_addr ) );
55
-	if ( ( rc = start_dhcp ( &monojob, netdev ) ) == 0 )
56
-		rc = monojob_wait ( "", 0 );
57
-
58
-	return rc;
59
-}
60
-
61
 int pxebs ( struct net_device *netdev, unsigned int pxe_type ) {
37
 int pxebs ( struct net_device *netdev, unsigned int pxe_type ) {
62
 	int rc;
38
 	int rc;
63
 
39
 

Carregando…
Cancelar
Salvar