Function report |
Source Code:lib\test_bpf.c |
Create Date:2022-07-28 06:27:58 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:build_test_skb
Proto:static __init struct sk_buff *build_test_skb(void)
Type:struct sk_buff
Parameter:Nothing
6808 | data_size = 8 |
6811 | page[i] = alloc_page(GFP_KERNEL) |
6820 | skb[i] = allocate an skbuff for sending |
6829 | add data to a buffer |
6830 | protocol = htons(Internet Protocol packet ) |
6831 | skb_reset_network_header(skb[i]) |
6832 | skb_set_mac_header(skb[i], - Total octets in header. ) |
6834 | skb_add_rx_frag(skb[i], 0, page[i], 0, 64, 64) |
6839 | gso_size = 1448 |
6840 | gso_type = SKB_GSO_TCPV4 |
6841 | gso_type |= SKB_GSO_DODGY |
6850 | Return skb[0] |
6852 | err_skb1 : |
6853 | __free_page(page[1]) |
6854 | err_page1 : |
6855 | free an sk_buff |
6856 | err_skb0 : |
6857 | __free_page(page[0]) |
6858 | err_page0 : |
6859 | Return NULL |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |