Lines Matching defs:reply

48  * the protocol used here is a simple request/reply scheme: a client
62 * the format of a reply is much the same: a single dhcp_ipc_reply_t;
122 * input: dhcp_ipc_request_t *: the request the reply is for
127 * output: dhcp_ipc_reply_t *: the reply on success, NULL on failure
134 dhcp_ipc_reply_t *reply = calloc(1, DHCP_IPC_REPLY_SIZE + buffer_size);
136 if (reply == NULL)
139 reply->message_type = request->message_type;
140 reply->ipc_id = request->ipc_id;
141 reply->return_code = return_code;
142 reply->data_length = buffer_size;
143 reply->data_type = data_type;
146 (void) memcpy(reply->buffer, buffer, buffer_size);
148 return (reply);
154 * input: dhcp_ipc_reply_t *: the reply to get data from
161 dhcp_ipc_get_data(dhcp_ipc_reply_t *reply, size_t *size, dhcp_data_type_t *type)
163 if (reply == NULL || reply->data_length == 0) {
169 *type = reply->data_type;
171 *size = reply->data_length;
172 return (reply->buffer);
254 * dhcp_ipc_recv_reply(): gets a reply using the agent's ipc protocol
257 * dhcp_ipc_reply_t **: address of a pointer to store the reply
265 dhcp_ipc_recv_reply(int fd, dhcp_ipc_reply_t **reply, int32_t timeout)
290 return (dhcp_ipc_recv_msg(fd, (void **)reply, DHCP_IPC_REPLY_SIZE,
320 * dhcp_ipc_send_reply(): transmits a reply using the agent's ipc protocol
323 * dhcp_ipc_reply_t *: the reply to send
328 dhcp_ipc_send_reply(int fd, dhcp_ipc_reply_t *reply)
330 return (dhcp_ipc_send_msg(fd, reply, DHCP_IPC_REPLY_SIZE +
331 reply->data_length));
359 * the reply
362 * dhcp_ipc_reply_t **: the reply (dynamically allocated)
369 dhcp_ipc_make_request(dhcp_ipc_request_t *request, dhcp_ipc_reply_t **reply,
405 retval = dhcp_ipc_recv_reply(fd, reply, timeout);
721 dhcp_ipc_reply_t *reply;
747 retval = dhcp_ipc_make_request(request, &reply, 0);
751 if (reply->return_code == 0) {
752 opt = dhcp_ipc_get_data(reply, &opt_size, NULL);
760 free(reply);
765 free(reply);
852 dhcp_ipc_reply_t *reply;
921 if (dhcp_ipc_make_request(request, &reply, 0) == 0)
922 free(reply);
951 if (dhcp_ipc_make_request(request, &reply, 0) == 0)
952 free(reply);