link.h 513 B

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