Branch: refs/heads/master
Home:
https://github.com/fabbione/kronosnet
Commit: 6488bdd6d09f6823539212439c4ad7881ba3b972
https://github.com/fabbione/kronosnet/commit/6488bdd6d09f6823539212439c4ad7…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2015-12-18 (Fri, 18 Dec 2015)
Changed paths:
M TODO
M kronosnetd/etherfilter.c
M kronosnetd/etherfilter.h
M kronosnetd/vty_cli_cmds.c
M libknet/handle.c
M libknet/internals.h
M libknet/khandle_test.c
M libknet/libknet.h
M libknet/onwire.h
M libknet/ping_test.c
M libknet/threads_common.h
M libknet/threads_send_recv.c
Log Message:
-----------
[global] add support for multiple local sockets/fds
WARNING: this commit changes API and onwire protocol
It is now possible to configure multiple local sockets to send/recv
data over the same knet handle.
to every send/recv socket a channel is assigned that behaves more
or less like a VLAN.
hostA channel 0 will be delivered to datafd on hostB channel 0
hostA channel 1 to hostB channel 1
etc.
It is possible to configure up to 32 channel, but there is space
to increase this number if necessary.
New API calls:
knet_handle_add_datafd
knet_handle_remove_datafd
knet_handle_enable_sock_notify
knet_handle_get_channel
knet_handle_get_datafd
Notification has been added in cases where a local socket is the result
of accepting a tcp connection that gets disconnected and corrective
action needs to be taken by the application.
Changed API calls:
knet_handle_new
knet_recv
knet_send
knet_handle_enable_filter
onwire changes:
add one byte to transport channel information
channel information are also passed down to the dst_host_filter
in the event the application has needs to modify that on TX/RX
events.
Internal changes:
cleanup how sockpairs are handled in general to make it simpler
to map application side and internal side.
NOTE: callback function has not been properly tested.
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>