Function report |
Source Code:lib\test_blackhole_dev.c |
Create Date:2022-07-28 06:37:26 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:test_blackholedev_init
Proto:static int __init test_blackholedev_init(void)
Type:int
Parameter:Nothing
51 | skb_set_transport_header(skb, 0) |
54 | check = 0 |
57 | skb_set_network_header(skb, 0) |
58 | hop_limit = 32 |
59 | payload_len = data_len + sizeof(structudphdr) |
60 | nexthdr = IPPROTO_UDP |
61 | saddr = in6addr_loopback |
62 | daddr = in6addr_loopback |
65 | skb_set_mac_header(skb, 0) |
67 | protocol = htons(IPv6 over bluebook ) |
69 | dev = blackhole_netdev |
72 | ret = transmit a buffer |
75 | Case ret == qdisc ->enqueue() return codes. |
76 | pr_warn("dev_queue_xmit() returned NET_XMIT_SUCCESS\n") |
77 | Break |
78 | Case ret == skb dropped |
79 | pr_warn("dev_queue_xmit() returned NET_XMIT_DROP\n") |
80 | Break |
81 | Case ret == congestion notification |
82 | pr_warn("dev_queue_xmit() returned NET_XMIT_CN\n") |
83 | Break |
84 | Default |
88 | Return 0 |
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 |