Changeset View
Changeset View
Standalone View
Standalone View
head/contrib/ntp/ntpd/ntp_control.c
Show First 20 Lines • Show All 840 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* ctl_error - send an error response for the current request | * ctl_error - send an error response for the current request | ||||
*/ | */ | ||||
static void | static void | ||||
ctl_error( | ctl_error( | ||||
u_char errcode | u_char errcode | ||||
) | ) | ||||
{ | { | ||||
int maclen; | size_t maclen; | ||||
numctlerrors++; | numctlerrors++; | ||||
DPRINTF(3, ("sending control error %u\n", errcode)); | DPRINTF(3, ("sending control error %u\n", errcode)); | ||||
/* | /* | ||||
* Fill in the fields. We assume rpkt.sequence and rpkt.associd | * Fill in the fields. We assume rpkt.sequence and rpkt.associd | ||||
* have already been filled in. | * have already been filled in. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 385 Lines • ▼ Show 20 Lines | |||||
* another if necessary. | * another if necessary. | ||||
*/ | */ | ||||
static void | static void | ||||
ctl_flushpkt( | ctl_flushpkt( | ||||
u_char more | u_char more | ||||
) | ) | ||||
{ | { | ||||
size_t i; | size_t i; | ||||
int dlen; | size_t dlen; | ||||
int sendlen; | size_t sendlen; | ||||
int maclen; | size_t maclen; | ||||
int totlen; | size_t totlen; | ||||
keyid_t keyid; | keyid_t keyid; | ||||
dlen = datapt - rpkt.u.data; | dlen = datapt - rpkt.u.data; | ||||
if (!more && datanotbinflag && dlen + 2 < CTL_MAX_DATA_LEN) { | if (!more && datanotbinflag && dlen + 2 < CTL_MAX_DATA_LEN) { | ||||
/* | /* | ||||
* Big hack, output a trailing \r\n | * Big hack, output a trailing \r\n | ||||
*/ | */ | ||||
*datapt++ = '\r'; | *datapt++ = '\r'; | ||||
▲ Show 20 Lines • Show All 3,786 Lines • Show Last 20 Lines |