cmdmon: add refresh command

This command can be used to resolve the names of configured sources to
IP addresses again.
This commit is contained in:
Gautier PHILIPPON
2015-09-29 16:08:43 +02:00
committed by Miroslav Lichvar
parent 440c159217
commit 3eb43f4619
6 changed files with 49 additions and 1 deletions

View File

@@ -150,6 +150,8 @@ command_unpadded_length(CMD_Request *r)
return offsetof(CMD_Request, data.null.EOR);
case REQ_SMOOTHTIME:
return offsetof(CMD_Request, data.smoothtime.EOR);
case REQ_REFRESH:
return offsetof(CMD_Request, data.null.EOR);
default:
/* If we fall through the switch, it most likely means we've forgotten to implement a new case */
assert(0);
@@ -304,6 +306,8 @@ PKL_CommandPaddingLength(CMD_Request *r)
return PADDING_LENGTH(data.null.EOR, data.smoothing.EOR);
case REQ_SMOOTHTIME:
return PADDING_LENGTH(data.smoothtime.EOR, data.null.EOR);
case REQ_REFRESH:
return PADDING_LENGTH(data.null.EOR, data.null.EOR);
default:
/* If we fall through the switch, it most likely means we've forgotten to implement a new case */
assert(0);