using aligned buffers for netlink

This commit is contained in:
Martin Willi
2008-11-14 14:23:11 +00:00
parent 32ec3c1a8b
commit 21bf86f740
3 changed files with 23 additions and 14 deletions
@@ -20,7 +20,15 @@
#include <library.h>
#define NETLINK_BUFFER_SIZE 1024
#include <linux/rtnetlink.h>
/**
* General purpose netlink buffer.
*
* 1024 byte is currently sufficient for all operations. Some platform
* require an enforced aligment to four bytes (e.g. ARM).
*/
typedef u_char netlink_buf_t[1024] __attribute__((aligned(RTA_ALIGNTO)));
typedef struct netlink_socket_t netlink_socket_t;