get_status actually returns driver information, so get_drv_info()
is better name.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
NULL, /* get_in6 */
NULL, /* add_router */
NULL, /* get_next_hop */
NULL, /* get_in6 */
NULL, /* add_router */
NULL, /* get_next_hop */
+ NULL, /* get_drv_info */
NULL, /* arp_lookup */
netdev_dummy_update_flags,
NULL, /* arp_lookup */
netdev_dummy_update_flags,
-netdev_linux_get_status(const struct netdev *netdev, struct shash *sh)
+netdev_linux_get_drv_info(const struct netdev *netdev, struct shash *sh)
{
int error;
struct netdev_dev_linux *netdev_dev =
{
int error;
struct netdev_dev_linux *netdev_dev =
-netdev_internal_get_status(const struct netdev *netdev OVS_UNUSED, struct shash *sh)
+netdev_internal_get_drv_info(const struct netdev *netdev OVS_UNUSED, struct shash *sh)
{
shash_add(sh, "driver_name", xstrdup("openvswitch"));
return 0;
{
shash_add(sh, "driver_name", xstrdup("openvswitch"));
return 0;
netdev_linux_get_stats,
NULL, /* set_stats */
netdev_linux_get_features,
netdev_linux_get_stats,
NULL, /* set_stats */
netdev_linux_get_features,
- netdev_linux_get_status);
+ netdev_linux_get_drv_info);
const struct netdev_class netdev_tap_class =
NETDEV_LINUX_CLASS(
const struct netdev_class netdev_tap_class =
NETDEV_LINUX_CLASS(
netdev_tap_get_stats,
NULL, /* set_stats */
netdev_linux_get_features,
netdev_tap_get_stats,
NULL, /* set_stats */
netdev_linux_get_features,
- netdev_linux_get_status);
+ netdev_linux_get_drv_info);
const struct netdev_class netdev_internal_class =
NETDEV_LINUX_CLASS(
const struct netdev_class netdev_internal_class =
NETDEV_LINUX_CLASS(
netdev_internal_get_stats,
netdev_vport_set_stats,
NULL, /* get_features */
netdev_internal_get_stats,
netdev_vport_set_stats,
NULL, /* get_features */
- netdev_internal_get_status);
+ netdev_internal_get_drv_info);
\f
/* HTB traffic control class. */
\f
/* HTB traffic control class. */
int (*get_next_hop)(const struct in_addr *host, struct in_addr *next_hop,
char **netdev_name);
int (*get_next_hop)(const struct in_addr *host, struct in_addr *next_hop,
char **netdev_name);
- /* Retrieves the status of the device.
+ /* Retrieves driver information of the device.
*
* Populates 'sh' with key-value pairs representing the status of the
*
* Populates 'sh' with key-value pairs representing the status of the
- * device. A device's status is a set of key-value string pairs
+ * device. Driver info is a set of key-value string pairs
* representing netdev type specific information. For more information see
* ovs-vswitchd.conf.db(5).
*
* representing netdev type specific information. For more information see
* ovs-vswitchd.conf.db(5).
*
*
* This function may be set to null if it would always return EOPNOTSUPP
* anyhow. */
*
* This function may be set to null if it would always return EOPNOTSUPP
* anyhow. */
- int (*get_status)(const struct netdev *netdev, struct shash *sh);
+ int (*get_drv_info)(const struct netdev *netdev, struct shash *sh);
/* Looks up the ARP table entry for 'ip' on 'netdev' and stores the
* corresponding MAC address in 'mac'. A return value of ENXIO, in
/* Looks up the ARP table entry for 'ip' on 'netdev' and stores the
* corresponding MAC address in 'mac'. A return value of ENXIO, in
-netdev_vport_get_status(const struct netdev *netdev, struct shash *sh)
+netdev_vport_get_drv_info(const struct netdev *netdev, struct shash *sh)
{
const char *iface = netdev_vport_get_tnl_iface(netdev);
{
const char *iface = netdev_vport_get_tnl_iface(netdev);
{
static const struct vport_class vport_classes[] = {
{ OVS_VPORT_TYPE_GRE,
{
static const struct vport_class vport_classes[] = {
{ OVS_VPORT_TYPE_GRE,
- { "gre", VPORT_FUNCTIONS(netdev_vport_get_status) },
+ { "gre", VPORT_FUNCTIONS(netdev_vport_get_drv_info) },
parse_tunnel_config, unparse_tunnel_config },
{ OVS_VPORT_TYPE_GRE,
parse_tunnel_config, unparse_tunnel_config },
{ OVS_VPORT_TYPE_GRE,
- { "ipsec_gre", VPORT_FUNCTIONS(netdev_vport_get_status) },
+ { "ipsec_gre", VPORT_FUNCTIONS(netdev_vport_get_drv_info) },
parse_tunnel_config, unparse_tunnel_config },
{ OVS_VPORT_TYPE_CAPWAP,
parse_tunnel_config, unparse_tunnel_config },
{ OVS_VPORT_TYPE_CAPWAP,
- { "capwap", VPORT_FUNCTIONS(netdev_vport_get_status) },
+ { "capwap", VPORT_FUNCTIONS(netdev_vport_get_drv_info) },
parse_tunnel_config, unparse_tunnel_config },
{ OVS_VPORT_TYPE_PATCH,
parse_tunnel_config, unparse_tunnel_config },
{ OVS_VPORT_TYPE_PATCH,
* may be used to populate the status column of the Interface table as defined
* in ovs-vswitchd.conf.db(5). */
int
* may be used to populate the status column of the Interface table as defined
* in ovs-vswitchd.conf.db(5). */
int
-netdev_get_status(const struct netdev *netdev, struct shash *sh)
+netdev_get_drv_info(const struct netdev *netdev, struct shash *sh)
{
struct netdev_dev *dev = netdev_get_dev(netdev);
{
struct netdev_dev *dev = netdev_get_dev(netdev);
- return (dev->netdev_class->get_status
- ? dev->netdev_class->get_status(netdev, sh)
+ return (dev->netdev_class->get_drv_info
+ ? dev->netdev_class->get_drv_info(netdev, sh)
int netdev_add_router(struct netdev *, struct in_addr router);
int netdev_get_next_hop(const struct netdev *, const struct in_addr *host,
struct in_addr *next_hop, char **);
int netdev_add_router(struct netdev *, struct in_addr router);
int netdev_get_next_hop(const struct netdev *, const struct in_addr *host,
struct in_addr *next_hop, char **);
-int netdev_get_status(const struct netdev *, struct shash *sh);
+int netdev_get_drv_info(const struct netdev *, struct shash *sh);
int netdev_arp_lookup(const struct netdev *, ovs_be32 ip, uint8_t mac[6]);
int netdev_get_flags(const struct netdev *, enum netdev_flags *);
int netdev_arp_lookup(const struct netdev *, ovs_be32 ip, uint8_t mac[6]);
int netdev_get_flags(const struct netdev *, enum netdev_flags *);
- if (!netdev_get_status(iface->netdev, &sh)) {
+ if (!netdev_get_drv_info(iface->netdev, &sh)) {
size_t n;
char **keys, **values;
size_t n;
char **keys, **values;