vshost-util-vserver

Build script and sources for util-vserver.
git clone https://ccx.te2000.cz/git/vshost-util-vserver
Log | Files | Refs

network_cmd.h (2217B)


      1 #ifndef _VX_NETWORK_CMD_H
      2 #define _VX_NETWORK_CMD_H
      3 
      4 
      5 /* vinfo commands */
      6 
      7 #define VCMD_task_nid		VC_CMD(VINFO, 2, 0)
      8 
      9 
     10 #define VCMD_nx_info		VC_CMD(VINFO, 6, 0)
     11 
     12 struct	vcmd_nx_info_v0 {
     13 	uint32_t nid;
     14 	/* more to come */
     15 };
     16 
     17 
     18 #define VCMD_net_create_v0	VC_CMD(VNET, 1, 0)
     19 #define VCMD_net_create		VC_CMD(VNET, 1, 1)
     20 
     21 struct  vcmd_net_create {
     22 	uint64_t flagword;
     23 };
     24 
     25 #define VCMD_net_migrate	VC_CMD(NETMIG, 1, 0)
     26 
     27 #define VCMD_net_add_v0		VC_CMD(NETALT, 1, 0)
     28 #define VCMD_net_remove_v0	VC_CMD(NETALT, 2, 0)
     29 
     30 struct	vcmd_net_addr_v0 {
     31 	uint16_t type;
     32 	uint16_t count;
     33 	struct in_addr ip[4];
     34 	struct in_addr mask[4];
     35 };
     36 
     37 #define VCMD_net_add_ipv4_v1	VC_CMD(NETALT, 1, 1)
     38 #define VCMD_net_remove_ipv4_v1	VC_CMD(NETALT, 2, 1)
     39 
     40 struct	vcmd_net_addr_ipv4_v1 {
     41 	uint16_t type;
     42 	uint16_t flags;
     43 	struct in_addr ip;
     44 	struct in_addr mask;
     45 };
     46 
     47 #define VCMD_net_add_ipv4	VC_CMD(NETALT, 1, 2)
     48 #define VCMD_net_rem_ipv4	VC_CMD(NETALT, 2, 2)
     49 
     50 struct	vcmd_net_addr_ipv4_v2 {
     51 	uint16_t type;
     52 	uint16_t flags;
     53 	struct in_addr ip;
     54 	struct in_addr ip2;
     55 	struct in_addr mask;
     56 };
     57 
     58 #define VCMD_net_add_ipv6	VC_CMD(NETALT, 3, 1)
     59 #define VCMD_net_remove_ipv6	VC_CMD(NETALT, 4, 1)
     60 
     61 struct	vcmd_net_addr_ipv6_v1 {
     62 	uint16_t type;
     63 	uint16_t flags;
     64 	uint32_t prefix;
     65 	struct in6_addr ip;
     66 	struct in6_addr mask;
     67 };
     68 
     69 #define VCMD_add_match_ipv4	VC_CMD(NETALT, 5, 0)
     70 #define VCMD_get_match_ipv4	VC_CMD(NETALT, 6, 0)
     71 
     72 struct	vcmd_match_ipv4_v0 {
     73 	uint16_t type;
     74 	uint16_t flags;
     75 	uint16_t parent;
     76 	uint16_t prefix;
     77 	struct in_addr ip;
     78 	struct in_addr ip2;
     79 	struct in_addr mask;
     80 };
     81 
     82 #define VCMD_add_match_ipv6	VC_CMD(NETALT, 7, 0)
     83 #define VCMD_get_match_ipv6	VC_CMD(NETALT, 8, 0)
     84 
     85 struct	vcmd_match_ipv6_v0 {
     86 	uint16_t type;
     87 	uint16_t flags;
     88 	uint16_t parent;
     89 	uint16_t prefix;
     90 	struct in6_addr ip;
     91 	struct in6_addr ip2;
     92 	struct in6_addr mask;
     93 };
     94 
     95 
     96 
     97 
     98 /* flag commands */
     99 
    100 #define VCMD_get_nflags		VC_CMD(FLAGS, 5, 0)
    101 #define VCMD_set_nflags		VC_CMD(FLAGS, 6, 0)
    102 
    103 struct	vcmd_net_flags_v0 {
    104 	uint64_t flagword;
    105 	uint64_t mask;
    106 };
    107 
    108 
    109 
    110 /* network caps commands */
    111 
    112 #define VCMD_get_ncaps		VC_CMD(FLAGS, 7, 0)
    113 #define VCMD_set_ncaps		VC_CMD(FLAGS, 8, 0)
    114 
    115 struct	vcmd_net_caps_v0 {
    116 	uint64_t ncaps;
    117 	uint64_t cmask;
    118 };
    119 
    120 #endif	/* _VX_CONTEXT_CMD_H */