vimage include files

Julian Elischer julian at elischer.org
Mon Jun 9 19:47:12 UTC 2008


The current vimage code adds a handful of new include files..
e.g.

vnet.h for vimage related defines that are related to general 
networking stuff

vinet for vimage related defines that are related to inet.

however eventually these defines would move to other files.

For example I think every single file that includes vinet.h
already includes netinet/in.h
so these definitions move into that file.

My question however comes with vnet.h

95% of the files that use it also include <net/if.h>
so possibly they could go there,
but a few of them don't.

they are:
uipc_socket.c      (sets a reference counter in the vnet structure)
raw_cb.c           accesses V_rawcb_list
raw_usrreq.c       accesses V_rawcb_list
tcp_output.c       lots of stuff of course but doesn't use if.h
tcp_timer.c        ditto
                    vnet appears to be needed jsut for the SYSCTL_V_
                    stuff. (marko?)

netipsec/keysock.c  no need for if.h

so there is no one place where all of the vnet structure is in scope
but if.h is the closest.


so should we:
keep vnet.h?
split it up a bit to make it more in scope?
Find/make an include file for "networking in general?"

is there such a file? As I said if.h seems the closest.




More information about the freebsd-virtualization mailing list