Basic functions for sk_buff{}
skb_headroom(), skb_tailroom()
Prototype / Description
int skb_headroom(const struct sk_buff *skb);
bytes at buffer head
int skb_tailroom(const struct sk_buff *skb);
bytes at buffer
Image![](https://lh3.googleusercontent.com/kP7N3Z9_YgmjIVxLgw4tVSvihJtlWYHRW5slVWl9vBzcmfSzP4xz1C-3qgIG2QnfalaQzxeO1N_E9KoNJI5-gb3cceDexHEJB3U_akdWxTbPt9D3ZL0QKLn8)
skb_reserve()
Prototype
void skb_reserve(struct sk_buff *skb, unsigned int len);
Description
adjust headroom
Image![](https://lh3.googleusercontent.com/-tFUy-xy3M1S7zMFWdAs7dAp4WabUuukDFGLMmVXXMif4tKwZ9V3fySna2UrnJdRaPJ6iX7WWJpMkxBRxlCdAGiMArE_uPnsocTrsES3bNPFHfcx2RpWnMyg)
skb_push()
Prototype
unsigned char *skb_push(struct sk_buff *skb, unsigned int len);
Description
add data to the start of a buffer
Image![](https://lh4.googleusercontent.com/GvBiO-GzlMjFswTWhLf1DcfVd75vcsYw9-_MVYKcZNDwBJKl5dqocuGiMuTim8z78UOhImWyR2YS2-CtGaWBf3Vyx3_YR_6kEnPk0mC_oMTVTiY6ZaSRKOw7)
skb_pull()
Prototype
unsigned char *skb_pull(struct sk_buff *skb, unsigned int len);
Description
remove data from the start of a buffer
Image![](https://lh6.googleusercontent.com/2l_7In7XscmmlLBTL1BQkkJ4PUoO9GsRl8tGupDK_ZD_MGFxI-ZG7BAZd6PE1uxQW_9NGHO1bFM6QOhb772IXqP2PWto7BYr0Dd6ha4bfB5W1XNXxLOUMypK)
skb_put()
Prototype
unsigned char *skb_put(struct sk_buff *skb, unsigned int len);
Description
add data to a buffer
Image![](https://lh6.googleusercontent.com/RBXzXpJHf0S7ij3YxC6N1l3fL81ay5_jHaq2KPT6WP6MsPV1Usv_R30OcR8PXipgSvvJz3rmgfAD9KIwulxXcYOQLvpGQzKc6k4sfer6aFTDPPwcxPCWRgFL)
skb_trim()
Prototype
void skb_trim(struct sk_buff *skb, unsigned int len);
Description
remove end from a buffer
Image![](https://lh3.googleusercontent.com/WFr2Pd13bZ54gmSm5phn8uBaFaCy7YALOheS8E6-RRNilDPmE2a9leXl9eb1T6bDywV6hIOs-aZPQhhigmHDMpoioullDqOh-r7UDbWJ8wKMoH2BtyOPDfjJ)
No comments:
Post a Comment