summaryrefslogtreecommitdiff
path: root/net-mgmt/dhcp_probe/files/patch-src_configfile.c
blob: a7d3438293bb4ec51c02c1d5a334e7e915278ce0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
--- src/configfile.c.orig	2021-01-18 19:18:05 UTC
+++ src/configfile.c
@@ -21,13 +21,13 @@
 /* chaddr to use for bootp header 'chaddr' and to construct ClientID option */
 /* optionally specified by user; if unspecified, GetChaddr() returns my_eaddr */
 /* Is required if do_not_lookup_enet_and_ip_addresses is also specifed. */
-struct ether_addr chaddr; 
+struct libnet_ether_addr chaddr; 
 int is_chaddr_specified; /* flag */
 
-/* ether_addr to use for ethernet frame src */
+/* libnet_ether_addr to use for ethernet frame src */
 /* optionally specified by user; if unspecified, GetEther_src() returns my_eaddr */
 /* Is required if do_not_lookup_enet_and_ip_addresses is also specifed. */
-struct ether_addr ether_src; 
+struct libnet_ether_addr ether_src; 
 int is_ether_src_specified; /* flag */
 
 /* An ipaddr to use for "Server Identifer" option  (when this is needed)
@@ -52,7 +52,7 @@ struct in_addr legal_servers[MAX_LEGAL_SERVERS];
 int num_legal_servers;
 
 /* array of legal DHCP servers' ethersrc addresses, and number elems in array */
-struct ether_addr legal_server_ethersrcs[MAX_LEGAL_SERVER_ETHERSRCS];
+struct libnet_ether_addr legal_server_ethersrcs[MAX_LEGAL_SERVER_ETHERSRCS];
 int num_legal_server_ethersrcs;
 
 /* parallel arrays of "lease networks of concern" (address & mask), and number of elems in arrays.
@@ -95,7 +95,7 @@ read_configfile(const char *fname)
 	int tokens; /* number of tokens successfully read by sscanf */
 	int tmpint;
 	unsigned int tmpuint;
-	struct ether_addr *enet;
+	struct libnet_ether_addr *enet;
 	struct in_addr inaddr, inaddr2;
 	int is_fatal_error;
 	
@@ -459,14 +459,14 @@ read_configfile(const char *fname)
 }
 
 
-struct ether_addr *
+struct libnet_ether_addr *
 GetChaddr (void)
 {
 /* Return copy of chaddr (if specified) else my_eaddr.
    Not re-entrant; we use static storage to hold the value address we return.
    Should not be called until global 'my_eaddr' has been init'd.
 */
-	static struct ether_addr chaddr_copy;
+	static struct libnet_ether_addr chaddr_copy;
 
 	/* we re-init the static copy on each call, since we don't know if the
 	   	caller has written into it. */
@@ -481,14 +481,14 @@ GetChaddr (void)
 }
 
 
-struct ether_addr *
+struct libnet_ether_addr *
 GetEther_src (void)
 {
 /* Return copy of ether_src (if specified) else my_eaddr.
    Not re-entrant; we use static storage to hold the value address we return.
    Should not be called until global 'my_eaddr' has been init'd.
 */
-	static struct ether_addr ether_src_copy;
+	static struct libnet_ether_addr ether_src_copy;
 
 	/* we re-init the static copy on each call, since we don't know if the
 	   	caller has written into it. */
@@ -594,7 +594,7 @@ isInLeaseNetworksOfConcern(struct in_addr *ipaddr)
 }
 
 int
-isLegalServerEthersrcsMember(struct ether_addr *eaddr)
+isLegalServerEthersrcsMember(struct libnet_ether_addr *eaddr)
 {
 /* If eaddr is a member of legal_server_ethersrcs[], return true.
    If legal_server_ethersrcs[] is empty, also return true.
@@ -615,7 +615,7 @@ isLegalServerEthersrcsMember(struct ether_addr *eaddr)
 		return 1;
 
 	for (i = 0; i < num_legal_server_ethersrcs; i++) {
-		if (!bcmp(eaddr, &legal_server_ethersrcs[i], sizeof(struct ether_addr))) 
+		if (!bcmp(eaddr, &legal_server_ethersrcs[i], sizeof(struct libnet_ether_addr))) 
 			return 1; /* found */
 	}
 	return 0; /* not found */