summaryrefslogtreecommitdiff
path: root/cleopatre/devkit/plcd/src/hpav.c
diff options
context:
space:
mode:
Diffstat (limited to 'cleopatre/devkit/plcd/src/hpav.c')
-rw-r--r--cleopatre/devkit/plcd/src/hpav.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/cleopatre/devkit/plcd/src/hpav.c b/cleopatre/devkit/plcd/src/hpav.c
index db3867af65..1ba6ff226c 100644
--- a/cleopatre/devkit/plcd/src/hpav.c
+++ b/cleopatre/devkit/plcd/src/hpav.c
@@ -113,11 +113,11 @@ int hpav_send_mme (const plcd_ctx_t *plcd_ctx, mme_ctx_t *request_ctx, mme_ctx_t
kernel_addr.nl_groups = 0; /* unicast */
/* create the message */
- nlh=(struct nlmsghdr *)malloc(NLMSG_SPACE(ETH_FRAME_LEN));
- memset(nlh, 0, NLMSG_SPACE(ETH_FRAME_LEN));
+ nlh=(struct nlmsghdr *)malloc(NLMSG_LENGTH(ETH_FRAME_LEN));
+ memset(nlh, 0, NLMSG_LENGTH(ETH_FRAME_LEN));
/* fill the netlink message header */
- nlh->nlmsg_len = NLMSG_SPACE(ETH_FRAME_LEN);
+ nlh->nlmsg_len = NLMSG_LENGTH(ETH_FRAME_LEN);
nlh->nlmsg_pid = getpid(); /* self pid */
nlh->nlmsg_flags = 0;
@@ -139,7 +139,7 @@ int hpav_send_mme (const plcd_ctx_t *plcd_ctx, mme_ctx_t *request_ctx, mme_ctx_t
msg.msg_iov = &iov;
msg.msg_iovlen = 1;
iov.iov_base = (void *)nlh;
- iov.iov_len = NLMSG_SPACE(msg_payload_len);
+ iov.iov_len = NLMSG_LENGTH(msg_payload_len);
if(0 > sendmsg (plcd_ctx->plc_sock, &msg, 0))
{
@@ -149,8 +149,8 @@ int hpav_send_mme (const plcd_ctx_t *plcd_ctx, mme_ctx_t *request_ctx, mme_ctx_t
}
/* prepare the recv message */
- memset(nlh, 0, NLMSG_SPACE(ETH_FRAME_LEN));
- iov.iov_len = NLMSG_SPACE(ETH_FRAME_LEN);
+ memset(nlh, 0, NLMSG_LENGTH(ETH_FRAME_LEN));
+ iov.iov_len = NLMSG_LENGTH(ETH_FRAME_LEN);
/* wait for confirm message */
timeout.tv_sec = MME_TOUT;