link.h 585 B

1234567891011121314151617181920212223242526
  1. #ifndef _IPYML_LINK_H
  2. #define _IPYML_LINK_H
  3. #include "hardware_address.h"
  4. #include "operstate.h"
  5. #include "yaml.h"
  6. #include <linux/netlink.h>
  7. #include <ostream>
  8. #include <string>
  9. class Link : public YamlObject {
  10. std::string ifname;
  11. HardwareAddress address, broadcast;
  12. unsigned long int mtu;
  13. OperState operstate;
  14. public:
  15. // typedef int (*mnl_attr_cb_t)(const struct nlattr *attr, void *data);
  16. static int mnl_attr_cb(const nlattr *attr, void *data);
  17. void write_yaml(std::ostream &stream,
  18. const yaml_indent_level_t indent_level = 0) const;
  19. };
  20. #endif