vport-netdev.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Copyright (c) 2007-2011 Nicira, Inc.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of version 2 of the GNU General Public
  6. * License as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. * General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program; if not, write to the Free Software
  15. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  16. * 02110-1301, USA
  17. */
  18. #ifndef VPORT_NETDEV_H
  19. #define VPORT_NETDEV_H 1
  20. #include <linux/netdevice.h>
  21. #include <linux/rcupdate.h>
  22. #include "vport.h"
  23. struct vport *ovs_netdev_get_vport(struct net_device *dev);
  24. struct netdev_vport {
  25. struct rcu_head rcu;
  26. struct net_device *dev;
  27. };
  28. static inline struct netdev_vport *
  29. netdev_vport_priv(const struct vport *vport)
  30. {
  31. return vport_priv(vport);
  32. }
  33. const char *ovs_netdev_get_name(const struct vport *);
  34. const char *ovs_netdev_get_config(const struct vport *);
  35. #endif /* vport_netdev.h */