version 1.1, 2013/07/29 19:37:40
|
version 1.1.1.4, 2021/03/17 00:56:46
|
Line 1
|
Line 1
|
/* dnsmasq is Copyright (c) 2000-2013 Simon Kelley | /* dnsmasq is Copyright (c) 2000-2021 Simon Kelley |
|
|
This program is free software; you can redistribute it and/or modify |
This program is free software; you can redistribute it and/or modify |
it under the terms of the GNU General Public License as published by |
it under the terms of the GNU General Public License as published by |
Line 29 void end_opt6(int container)
|
Line 29 void end_opt6(int container)
|
PUTSHORT(len, p); |
PUTSHORT(len, p); |
} |
} |
|
|
|
void reset_counter(void) |
|
{ |
|
/* Clear out buffer when starting from beginning */ |
|
if (daemon->outpacket.iov_base) |
|
memset(daemon->outpacket.iov_base, 0, daemon->outpacket.iov_len); |
|
|
|
save_counter(0); |
|
} |
|
|
int save_counter(int newval) |
int save_counter(int newval) |
{ |
{ |
int ret = outpacket_counter; |
int ret = outpacket_counter; |
|
|
if (newval != -1) |
if (newval != -1) |
outpacket_counter = newval; |
outpacket_counter = newval; |
|
|
Line 70 void *put_opt6(void *data, size_t len)
|
Line 80 void *put_opt6(void *data, size_t len)
|
{ |
{ |
void *p; |
void *p; |
|
|
if ((p = expand(len))) | if ((p = expand(len)) && data) |
memcpy(p, data, len); |
memcpy(p, data, len); |
| |
return p; |
return p; |
} |
} |
|
|