netlink-socket: Adapt to Windows and MSVC.
authorAlin Serdean <aserdean@cloudbasesolutions.com>
Tue, 29 Jul 2014 15:23:28 +0000 (15:23 +0000)
committerBen Pfaff <blp@nicira.com>
Tue, 29 Jul 2014 16:38:42 +0000 (09:38 -0700)
commit22326ba6f844740aa38994d99ed52b5499b11e75
tree0c121c9acd22a5b5ec079bbed1f31809a69b4e1b
parente214f75182f9e2b14f87d6a976739c38fc3d4c70
netlink-socket: Adapt to Windows and MSVC.

Add two functions set_sock_pid_in_kernel and portid_next. This will allow
the channel identification for the kernel extension to send back messages.

Replace send with WriteFile equivalent and ignore nl_sock_drain for the moment
under MSVC.

Replace sendmsg and recvmsg with ReadFile and WriteFile equivalents.

On MSVC put in handle instead of fd(sock->fd becomes sock->handle).

Creation of the netlink socket will be replaced by CreateFile equivalent.

Add MAX_STACK_LENGTH for MSVC.  This will be our maximum size for on-stack
copy buffer.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/netlink-socket.c