skb.h 915 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * linux/can/skb.h
  3. *
  4. * Definitions for the CAN network socket buffer
  5. *
  6. * Copyright (C) 2012 Oliver Hartkopp <socketcan@hartkopp.net>
  7. *
  8. */
  9. #ifndef CAN_SKB_H
  10. #define CAN_SKB_H
  11. #include <linux/types.h>
  12. #include <linux/can.h>
  13. /*
  14. * The struct can_skb_priv is used to transport additional information along
  15. * with the stored struct can(fd)_frame that can not be contained in existing
  16. * struct sk_buff elements.
  17. * N.B. that this information must not be modified in cloned CAN sk_buffs.
  18. * To modify the CAN frame content or the struct can_skb_priv content
  19. * skb_copy() needs to be used instead of skb_clone().
  20. */
  21. /**
  22. * struct can_skb_priv - private additional data inside CAN sk_buffs
  23. * @ifindex: ifindex of the first interface the CAN frame appeared on
  24. * @cf: align to the following CAN frame at skb->data
  25. */
  26. struct can_skb_priv {
  27. int ifindex;
  28. struct can_frame cf[0];
  29. };
  30. #endif /* CAN_SKB_H */