Port vRouter to FreeBSD: Adjust common code to BSD.

- change all uXX to uint_xxt
- add #if defined(__linux__) to linux specific code
- include proper headers for BSD
- replace netlink socket with dedicated FreeBSD socket

Change-Id: Ia5c4faeb570178686b1e93f353fa0b94dc00fda3
Port vRouter to FreeBSD: Implement OS specific code.

- implement vhost driver
- implement FreeBSD OS callbacks
- implement dedicated socket for module/agent communication
- implement OS specific network drivers hooks/callbacks

Change-Id: I568c6558faa79111a6627674046b714406aa7d47
Fix "memory modified after free" when unloading module.

vhost driver should be deinitialized after all vifs are
destroyed. Otherwise vif tries to update vhost priv
structure which does not exist anymore.

Change-Id: I5f03131c0a060c8bfcc13e173476d65a8b792c2e
Clean up changes related to AF_BRIDGE.

AF_BRIDGE is defined in the same way as in Linux and all
reference to it are uncommented.

Change-Id: I336f073966e5541ce0522b8b2f9a3d0780316818
Unbreak compilation

Change-Id: Ia22f0e9f40e6cfdd451fe6f9e724f7c8e65b9b54
Refactor includes.

Remove header files with request structures from vr_os.h and include
them in files which really need it.

Change-Id: Ibdf2e1b8887c67409db958ca8607782442340a66
Invariants must be compiled into kernel so remove define from Makefile.

When module is loaded in kernel which has no INVARIANTS enabled
the load fails cause kassert_panic symbol doesn't exist in kernel.

Change-Id: I4397ebd8353d378a55bbc1ab975af82f1bccb6a4
Remove commented out defines from Makefile.

Change-Id: Idd49fa664877945015ded8adf811ce7290566385
Use fake netlink socket for agent<=>module communication.

Communication between vRouter kernel module and agent has been encapsulated
(back) in Netlink. For that purpose, fake implementaion of Netlink has been
provided on BSD (non-systemwide). This implementation contains only structures
and defines that are used by Contrail's source code, not more.
This measure has been taken to limit number of changes and differences
between implementations of the protocol (vRouter<->agent), as due to some
of characteristics of Netlink protocol being used by the protocol additional
structures would have to be provided to provide missing functionality.

Change-Id: I4a34b8dc6abc59daa2db8f1863b9e54658255ce1
vhost_create modification to support FreeBSD

Formerly, the vhost_create, tries to crete interfaces via Netlink,
which does not exist on FreeBSD; in the purpose to support interface
creation on FreeBSD the missing functionality has been provided
via ioctl calls.

Change-Id: I261844d6a68491cf410be2a1e3c1f29bd2297550
Merge branch 'master' into freebsd

Conflicts:
	utils/mirror.c
	utils/mpls.c
	utils/nh.c
	utils/vxlan.c

Change-Id: Ia6aacbd8f3ac16f74be7ba8512e073f9ded52e8c
Follow up latest changes in vrouter
vrouter: fixing incorrect length values in packet headers

There has been mistake made during calculation of values for
size attributes of headers structures in Netlink protocol.
Mostly the size of header has been omitted, while should be
included.
Additionally comments in netlink.h has been updated to better
explain the meaning of length fields in Nelink header structures.
Merge pull request #1 from Semihalf/freebsd__vrouter_netlink_fix

vrouter: fixing incorrect length values in packet headers
vrouter: VR socket ("fake Netlink") buffers are too small

Due to above there is need to alter the send's buffer size
(as it was originally 512bytes which is far smaller than original
Netlink implementation on linux.) It does not really affect the
receive buffer, which has its size altered anyway on the agent size.
Merge pull request #2 from Semihalf/fix-vrsock-buffer-size

vrouter: VR socket ("fake Netlink") buffers are too small
vrouter: Fixing problem with sending NLMSG_DONE from vr_transport_request

There has been problem with improperly prepared mbuf for NLMSG_DONE,
which prevented the message from being send properly.
The problem was that the size of message was not set properly.
Merge pull request #3 from Semihalf/fix-vrouter-nlmsg-done

vrouter: Fixing problem with sending NLMSG_DONE from vrouter module
Update headers lenghts according to linux version of module.
Merge pull request #4 from Semihalf/fix-utils-segmentation-fault

Update headers lenghts according to linux version of module.