Searched refs:lease (Results 1 - 25 of 36) sorted by relevance

12

/netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/dnsmasq-2.15/src/
H A Dlease.c29 struct dhcp_lease *lease; local
42 /* a+ mode lease pointer at end. */
88 if (!(lease = lease_allocate(buff2, clid_len, addr)))
91 lease->expires = expires;
92 memcpy(lease->hwaddr, hwaddr, ETHER_ADDR_LEN);
95 lease_set_hostname(lease, buff, daemon->domain_suffix);
109 struct dhcp_lease *lease; local
112 for (lease = leases; lease; lease
120 struct dhcp_lease *lease; local
172 struct dhcp_lease *lease; local
190 struct dhcp_lease *lease, *tmp, **up; local
220 struct dhcp_lease *lease; local
241 struct dhcp_lease *lease; local
253 struct dhcp_lease *lease; local
285 lease_set_expires(struct dhcp_lease *lease, time_t exp) argument
293 lease_set_hwaddr(struct dhcp_lease *lease, unsigned char *hwaddr) argument
302 lease_set_hostname(struct dhcp_lease *lease, char *name, char *suffix) argument
[all...]
H A Disc.c64 struct isc_lease *lease, *tmp, **up; local
100 if (strcmp(token, "lease") == 0)
129 next_token(token, MAXTOK, fp) && /* Get date from lease file */
183 "Ignoring DHCP lease for %s because it has an illegal domain part",
191 for (lease = leases; lease; lease = lease->next)
192 if (hostname_isequal(lease->name, hostname))
194 lease
[all...]
H A Drfc2131.c85 struct dhcp_lease *lease, *ltmp; local
146 machine which got a lease via a relay won't use the relay to renew. */
153 Note that if netmasks, netid or lease times don't match, odd things may happen. */
330 /* do we have a lease in store? */
331 lease = lease_find_by_client(clid, clid_len);
348 if (lease)
349 expires_time = (unsigned int)difftime(lease->expires, now);
390 if (lease && lease->addr.s_addr == option_addr(opt).s_addr)
391 lease_prune(lease, no
[all...]
/netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/router/busybox-1.x/networking/udhcp/
H A Ddumpleases.c18 struct dhcpOfferedAddr lease; local
42 while (full_read(fd, &lease, sizeof(lease)) == sizeof(lease)) {
43 printf(":%02x"+1, lease.chaddr[0]);
45 printf(":%02x", lease.chaddr[i]);
47 addr.s_addr = lease.yiaddr;
49 expires = ntohl(lease.expires);
H A Ddhcpd.c37 struct dhcpOfferedAddr *lease, static_lease; local
68 server_config.lease = LEASE_TIME;
70 memcpy(&server_config.lease, option->data + 2, 4);
71 server_config.lease = ntohl(server_config.lease);
152 /* Look for a static lease */
156 bb_info_msg("Found static lease: %x", static_lease_ip);
162 lease = &static_lease;
164 lease = find_lease_by_chaddr(packet.chaddr);
184 if (lease) {
[all...]
H A Dleases.c11 /* Find the oldest expired lease, NULL if there are no expired leases */
28 /* clear every lease out that chaddr OR yiaddr matches and is nonzero */
45 /* add a lease into the table, clearing out any old ones */
46 struct dhcpOfferedAddr *add_lease(const uint8_t *chaddr, uint32_t yiaddr, unsigned long lease) argument
58 oldest->expires = time(0) + lease;
65 /* true if a lease has expired */
66 int lease_expired(struct dhcpOfferedAddr *lease) argument
68 return (lease->expires < (unsigned long) time(0));
72 /* Find the first lease that matches chaddr, NULL if no match */
85 /* Find the first lease tha
123 struct dhcpOfferedAddr *lease = NULL; local
[all...]
H A Dserverpacket.c105 struct dhcpOfferedAddr *lease = NULL; local
106 uint32_t req_align, lease_time_align = server_config.lease;
119 /* the client is in our lease/offered table */
120 lease = find_lease_by_chaddr(oldpacket->chaddr);
121 if (lease) {
122 if (!lease_expired(lease))
123 lease_time_align = lease->expires - time(0);
124 packet.yiaddr = lease->yiaddr;
129 /* and the ip is in the lease range */
132 && !static_lease_ip /* Check that its not a static lease */
[all...]
H A Ddhcpd.h37 char remaining; /* should the lease file be interpreted as lease time remaining, or
38 * as the time the lease expires */
39 uint32_t lease; /* lease time in seconds (host order) */ member in struct:server_config_t
47 uint32_t min_lease; /* minimum lease a client can request */
69 struct dhcpOfferedAddr *add_lease(const uint8_t *chaddr, uint32_t yiaddr, unsigned long lease);
70 int lease_expired(struct dhcpOfferedAddr *lease);
78 /* Config file will pass static lease info to this function which will add it
81 /* Check to see if a mac has an associated static lease */
[all...]
H A Ddhcpc.c149 uint32_t lease = 0; /* can be given as 32-bit quantity */ local
349 bb_info_msg("No lease, forking to background");
352 bb_info_msg("No lease, failing");
389 if ((t2 - t1) <= (lease / 14400 + 1)) {
403 if ((lease - t2) <= (lease / 14400 + 1)) {
414 t2 = (lease - t2) / 2 + t2;
481 bb_error_msg("no lease time with ACK, using 1 hour lease");
482 lease
[all...]
H A Dfiles.c309 /* ADDME: static lease */
419 struct dhcpOfferedAddr lease; local
427 && full_read(fp, &lease, sizeof(lease)) == sizeof(lease)
429 /* ADDME: is it a static lease */
430 uint32_t y = ntohl(lease.yiaddr);
432 lease.expires = ntohl(lease.expires);
434 lease
[all...]
/netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/udhcpd/
H A Ddhcpd.c93 struct dhcpOfferedAddr *lease; local
114 memcpy(&server_config.lease, option->data + 2, 4);
115 server_config.lease = ntohl(server_config.lease);
117 else server_config.lease = LEASE_TIME;
202 /* ADDME: look for a static lease */
203 lease = find_lease_by_chaddr(packet.chaddr);
252 if (lease) { /*ADDME: or static lease */
257 requested_align == lease
[all...]
H A Ddumpleases.c42 struct lease_t lease; local
68 printf(" -r, --remaining Interepret lease times as time remaing\n");
69 printf(" -a, --absolute Interepret lease times as expire time\n");
81 while (fread(&lease, sizeof(lease), 1, fp)) {
83 printf("%-16s ", lease.hostname);
85 printf("%02x", lease.chaddr[i]);
88 addr.s_addr = lease.yiaddr;
90 expires = ntohl(lease.expires);
H A Dleases.h16 struct dhcpOfferedAddr *add_lease(u_int8_t *chaddr, u_int32_t yiaddr, unsigned long lease);
17 int lease_expired(struct dhcpOfferedAddr *lease);
H A Dserverpacket.c111 struct dhcpOfferedAddr *lease = NULL; local
112 u_int32_t req_align, lease_time_align = server_config.lease;
124 /* the client is in our lease/offered table */
125 if ((lease = find_lease_by_chaddr(oldpacket->chaddr)) &&
128 !check_ip(lease->yiaddr)) {
130 if (!lease_expired(lease))
131 lease_time_align = lease->expires - time(0);
132 packet.yiaddr = lease->yiaddr;
147 /* and the ip is in the lease range */
156 /* and its not already taken/offered */ /* ADDME: check that its not a static lease */
[all...]
H A Dleases.c21 /* clear every lease out that chaddr OR yiaddr matches and is nonzero */
36 /* add a lease into the table, clearing out any old ones */
37 struct dhcpOfferedAddr *add_lease(u_int8_t *chaddr, u_int32_t yiaddr, unsigned long lease) argument
49 oldest->expires = time(0) + lease;
56 /* true if a lease has expired */
57 int lease_expired(struct dhcpOfferedAddr *lease) argument
59 return (lease->expires < (unsigned long) time(0));
63 /* Find the oldest expired lease, NULL if there are no expired leases */
81 /* Find the first lease that matches chaddr, NULL if no match */
93 /* Find the first lease tha
108 struct dhcpOfferedAddr *lease = NULL; local
163 struct dhcpOfferedAddr *lease = NULL; local
[all...]
H A Dfiles.c193 /*ADDME: static lease */
283 struct dhcpOfferedAddr lease, *oldest; local
290 while (i < server_config.max_leases && (fread(&lease, sizeof lease, 1, fp) == 1)) {
291 /* ADDME: is it a static lease */
292 if (lease.yiaddr >= server_config.start && lease.yiaddr <= server_config.end) {
293 lease.expires = ntohl(lease.expires);
294 if (!server_config.remaining) lease
[all...]
H A Ddhcpc.c136 " -f, --foreground Do not fork after getting lease\n"
137 " -b, --background Fork to background if lease cannot be\n"
140 " -n, --now Exit with failure if lease cannot be\n"
143 " -q, --quit Quit after obtaining lease\n"
280 unsigned long start = 0, lease; local
502 LOG(LOG_INFO, "No lease, forking to background.");
505 LOG(LOG_INFO, "No lease, failing.");
531 /* No lease found yet, signal 'autoipd'
570 if ((t2 - t1) <= (lease / 14400 + 1)) {
585 if ((lease
[all...]
H A Ddhcpd.h112 unsigned long lease; /* lease time in seconds (host order) */ member in struct:server_config_t
114 char remaining; /* should the lease file be interpreted as lease time remaining, or
115 * as the time the lease expires */
122 unsigned long min_lease; /* minimum lease a client can request*/
/netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/udhcpd/samples/
H A Dudhcpd.conf3 # The start and end of the IP lease block
21 # remaining for each lease in the udhcpd leases file. This is
23 # If you set remaining to no, the absolute time that the lease
31 # lease file. (specified in seconds)
52 # If a lease to be given is below this value, the full lease time is
66 # Useful for writing the lease file to flash every few hours.
83 # lines. The only option with a default is 'lease'.
92 option lease 864000 # 10 days of seconds
113 #lease
[all...]
/netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/router/busybox-1.x/examples/udhcp/
H A Dudhcpd.conf3 # The start and end of the IP lease block
21 # remaining for each lease in the udhcpd leases file. This is
23 # If you set remaining to no, the absolute time that the lease
31 # lease file. (specified in seconds)
52 # If a lease to be given is below this value, the full lease time is
66 # Useful for writing the lease file to flash every few hours.
83 # lines. The only option with a default is 'lease'.
92 option lease 864000 # 10 days of seconds
113 #opt lease
[all...]
/netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/fs/nfs/
H A Dnfs4renewd.c65 long lease, timeout; local
74 lease = clp->cl_lease_time;
77 timeout = (2 * lease) / 3 + (long)last - (long)now;
78 /* Are we close to a lease timeout? */
79 if (time_after(now, last + lease/3)) {
91 timeout = (2 * lease) / 3;
94 dprintk("%s: failed to call renewd. Reason: lease not expired \n",
/netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/db-4.7.25.NC/docs_src/ref/rep/
H A DMakefile5 init.html intro.html lease.html mastersync.html mgr_meth.html \
/netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/router/dhcp6/
H A Dlease_token.l54 #include "lease.h"
81 YYABORT("lease parse error"); \
142 /* lease parser */
143 "lease" {
146 YYABORT("failed to allocate memory for a lease");
262 dprintf(LOG_ERR, "parse an invalid lease %s/%d within line %d",
271 dprintf(LOG_INFO, "This lease addr %s/%d has been expired.",
279 dprintf(LOG_INFO, "This lease addr %s/%d is invalid. Removing.",
283 /* remove the previous old lease */
313 /* remove the previous old lease */
[all...]
H A Dserver6_addr.c58 #include "lease.h"
167 struct dhcp6_lease *lease; local
172 if ((lease = hash_search(lease_hash_table, (void *)&lv->lease_addr)) != NULL) {
212 dhcp6_remove_lease(lease)
213 struct dhcp6_lease *lease;
215 lease->state = INVALID;
216 if (write_lease(lease, server6_lease_file) != 0) {
217 dprintf(LOG_ERR, "%s" "failed to write an invalid lease %s to lease file",
218 FNAME, in6addr2str(&lease
242 struct dhcp6_lease *lease, *lease_next = NULL; local
[all...]
H A Dserver6_conf.h114 struct lease *active;
115 struct lease *expired;
116 struct lease *abandoned;

Completed in 451 milliseconds

12