2 * Copyright (c) 2008, 2009 Nicira Networks.
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 #ifndef OPENVSWITCH_BRCOMPAT_NETLINK_H
18 #define OPENVSWITCH_BRCOMPAT_NETLINK_H 1
20 #define BRC_GENL_FAMILY_NAME "brcompat"
22 /* Attributes that can be attached to the datapath's netlink messages. */
25 BRC_GENL_A_DP_NAME, /* Datapath name. */
26 BRC_GENL_A_PORT_NAME, /* Interface name. */
27 BRC_GENL_A_ERR_CODE, /* Positive error code. */
28 BRC_GENL_A_MC_GROUP, /* Generic netlink multicast group. */
29 BRC_GENL_A_PROC_DIR, /* Name of subdirectory in /proc. */
30 BRC_GENL_A_PROC_NAME, /* Name of file in /proc. */
31 BRC_GENL_A_PROC_DATA, /* Contents of file in /proc. */
34 BRC_GENL_A_MAX = __BRC_GENL_A_MAX - 1
37 /* Commands that can be executed on the datapath's netlink interface. */
38 enum brc_genl_command {
42 * "K:" messages are sent by the kernel to userspace.
43 * "U:" messages are sent by userspace to the kernel.
45 BRC_GENL_C_DP_ADD, /* K: Datapath created. */
46 BRC_GENL_C_DP_DEL, /* K: Datapath destroyed. */
47 BRC_GENL_C_DP_RESULT, /* U: Return code from ovs-brcompatd. */
48 BRC_GENL_C_PORT_ADD, /* K: Port added to datapath. */
49 BRC_GENL_C_PORT_DEL, /* K: Port removed from datapath. */
50 BRC_GENL_C_QUERY_MC, /* U: Get multicast group for brcompat. */
51 BRC_GENL_C_SET_PROC, /* U: Set contents of file in /proc. */
54 BRC_GENL_C_MAX = __BRC_GENL_C_MAX - 1
56 #endif /* openvswitch/brcompat-netlink.h */