- retval = send(sock->fd, msg->data, msg->size, wait ? 0 : MSG_DONTWAIT);
+ retval = send(sock->fd, ofpbuf_data(msg), ofpbuf_size(msg), wait ? 0 : MSG_DONTWAIT);
- log_nlmsg(__func__, error, msg->data, msg->size, sock->protocol);
+ log_nlmsg(__func__, error, ofpbuf_data(msg), ofpbuf_size(msg), sock->protocol);
* will be set to 'sock''s pid, and nlmsg_seq will be initialized to a fresh
* sequence number, before the message is sent.
*
* will be set to 'sock''s pid, and nlmsg_seq will be initialized to a fresh
* sequence number, before the message is sent.
*
* will be set to 'sock''s pid, and nlmsg_seq will be initialized to
* 'nlmsg_seq', before the message is sent.
*
* will be set to 'sock''s pid, and nlmsg_seq will be initialized to
* 'nlmsg_seq', before the message is sent.
*
if (retval < sizeof *nlmsghdr
|| nlmsghdr->nlmsg_len < sizeof *nlmsghdr
|| nlmsghdr->nlmsg_len > retval) {
if (retval < sizeof *nlmsghdr
|| nlmsghdr->nlmsg_len < sizeof *nlmsghdr
|| nlmsghdr->nlmsg_len > retval) {
if (retval > buf->allocated) {
COVERAGE_INC(netlink_recv_jumbo);
ofpbuf_put(buf, tail, retval - buf->allocated);
}
if (retval > buf->allocated) {
COVERAGE_INC(netlink_recv_jumbo);
ofpbuf_put(buf, tail, retval - buf->allocated);
}
- log_nlmsg(__func__, 0, buf->data, buf->size, sock->protocol);
+ log_nlmsg(__func__, 0, ofpbuf_data(buf), ofpbuf_size(buf), sock->protocol);
struct nl_transaction *txn = transactions[i];
struct nlmsghdr *nlmsg = nl_msg_nlmsghdr(txn->request);
struct nl_transaction *txn = transactions[i];
struct nlmsghdr *nlmsg = nl_msg_nlmsghdr(txn->request);
- log_nlmsg(__func__, error, txn->request->data, txn->request->size,
+ log_nlmsg(__func__, error, ofpbuf_data(txn->request), ofpbuf_size(txn->request),
}
error = nl_sock_transact_multiple__(sock, transactions, count, &done);
}
error = nl_sock_transact_multiple__(sock, transactions, count, &done);
* reply, if any, is discarded.
*
* Before the message is sent, nlmsg_len in 'request' will be finalized to
* reply, if any, is discarded.
*
* Before the message is sent, nlmsg_len in 'request' will be finalized to
* be initialized, NLM_F_ACK will be set in nlmsg_flags.
*
* The caller is responsible for destroying 'request'.
* be initialized, NLM_F_ACK will be set in nlmsg_flags.
*
* The caller is responsible for destroying 'request'.
* have been initialized with nl_dump_start(), and 'buffer' must have been
* initialized. 'buffer' should be at least NL_DUMP_BUFSIZE bytes long.
*
* have been initialized with nl_dump_start(), and 'buffer' must have been
* initialized. 'buffer' should be at least NL_DUMP_BUFSIZE bytes long.
*
* the message that was retrieved. The caller must not modify 'reply' (because
* it points within 'buffer', which will be used by future calls to this
* function).
*
* the message that was retrieved. The caller must not modify 'reply' (because
* it points within 'buffer', which will be used by future calls to this
* function).
*
* to 0. Failure might indicate an actual error or merely the end of replies.
* An error status for the entire dump operation is provided when it is
* completed by calling nl_dump_done().
* to 0. Failure might indicate an actual error or merely the end of replies.
* An error status for the entire dump operation is provided when it is
* completed by calling nl_dump_done().