hsr_framereg.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* Copyright 2011-2013 Autronica Fire and Security AS
  2. *
  3. * This program is free software; you can redistribute it and/or modify it
  4. * under the terms of the GNU General Public License as published by the Free
  5. * Software Foundation; either version 2 of the License, or (at your option)
  6. * any later version.
  7. *
  8. * Author(s):
  9. * 2011-2013 Arvid Brodin, arvid.brodin@xdin.com
  10. */
  11. #ifndef _HSR_FRAMEREG_H
  12. #define _HSR_FRAMEREG_H
  13. #include "hsr_main.h"
  14. struct node_entry;
  15. struct node_entry *hsr_find_node(struct list_head *node_db, struct sk_buff *skb);
  16. struct node_entry *hsr_merge_node(struct hsr_priv *hsr_priv,
  17. struct node_entry *node,
  18. struct sk_buff *skb,
  19. enum hsr_dev_idx dev_idx);
  20. void hsr_addr_subst_source(struct hsr_priv *hsr_priv, struct sk_buff *skb);
  21. void hsr_addr_subst_dest(struct hsr_priv *hsr_priv, struct ethhdr *ethhdr,
  22. enum hsr_dev_idx dev_idx);
  23. void hsr_register_frame_in(struct node_entry *node, enum hsr_dev_idx dev_idx);
  24. int hsr_register_frame_out(struct node_entry *node, enum hsr_dev_idx dev_idx,
  25. struct sk_buff *skb);
  26. void hsr_prune_nodes(struct hsr_priv *hsr_priv);
  27. int hsr_create_self_node(struct list_head *self_node_db,
  28. unsigned char addr_a[ETH_ALEN],
  29. unsigned char addr_b[ETH_ALEN]);
  30. void *hsr_get_next_node(struct hsr_priv *hsr_priv, void *_pos,
  31. unsigned char addr[ETH_ALEN]);
  32. int hsr_get_node_data(struct hsr_priv *hsr_priv,
  33. const unsigned char *addr,
  34. unsigned char addr_b[ETH_ALEN],
  35. unsigned int *addr_b_ifindex,
  36. int *if1_age,
  37. u16 *if1_seq,
  38. int *if2_age,
  39. u16 *if2_seq);
  40. #endif /* _HSR_FRAMEREG_H */