c8b60f958669e15b44fb87b37a26c17a23effb85
[govpp.git] / examples / bin_api / af_packet / af_packet.go
1 // Package af_packet represents the VPP binary API of the 'af_packet' VPP module.
2 // DO NOT EDIT. Generated from 'bin_api/af_packet.api.json' on Thu, 04 May 2017 13:11:57 CEST.
3 package af_packet
4
5 import "git.fd.io/govpp.git/api"
6
7 // VlApiVersion contains version of the API.
8 const VlAPIVersion = 0x4ca71f33
9
10 // AfPacketCreate represents the VPP binary API message 'af_packet_create'.
11 // Generated from 'bin_api/af_packet.api.json', line 6:
12 //
13 //        ["af_packet_create",
14 //            ["u16", "_vl_msg_id"],
15 //            ["u32", "client_index"],
16 //            ["u32", "context"],
17 //            ["u8", "host_if_name", 64],
18 //            ["u8", "hw_addr", 6],
19 //            ["u8", "use_random_hw_addr"],
20 //            {"crc" : "0x92768640"}
21 //        ],
22 //
23 type AfPacketCreate struct {
24         HostIfName      []byte `struc:"[64]byte"`
25         HwAddr          []byte `struc:"[6]byte"`
26         UseRandomHwAddr uint8
27 }
28
29 func (*AfPacketCreate) GetMessageName() string {
30         return "af_packet_create"
31 }
32 func (*AfPacketCreate) GetMessageType() api.MessageType {
33         return api.RequestMessage
34 }
35 func (*AfPacketCreate) GetCrcString() string {
36         return "92768640"
37 }
38 func NewAfPacketCreate() api.Message {
39         return &AfPacketCreate{}
40 }
41
42 // AfPacketCreateReply represents the VPP binary API message 'af_packet_create_reply'.
43 // Generated from 'bin_api/af_packet.api.json', line 15:
44 //
45 //        ["af_packet_create_reply",
46 //            ["u16", "_vl_msg_id"],
47 //            ["u32", "context"],
48 //            ["i32", "retval"],
49 //            ["u32", "sw_if_index"],
50 //            {"crc" : "0x718bac92"}
51 //        ],
52 //
53 type AfPacketCreateReply struct {
54         Retval    int32
55         SwIfIndex uint32
56 }
57
58 func (*AfPacketCreateReply) GetMessageName() string {
59         return "af_packet_create_reply"
60 }
61 func (*AfPacketCreateReply) GetMessageType() api.MessageType {
62         return api.ReplyMessage
63 }
64 func (*AfPacketCreateReply) GetCrcString() string {
65         return "718bac92"
66 }
67 func NewAfPacketCreateReply() api.Message {
68         return &AfPacketCreateReply{}
69 }
70
71 // AfPacketDelete represents the VPP binary API message 'af_packet_delete'.
72 // Generated from 'bin_api/af_packet.api.json', line 22:
73 //
74 //        ["af_packet_delete",
75 //            ["u16", "_vl_msg_id"],
76 //            ["u32", "client_index"],
77 //            ["u32", "context"],
78 //            ["u8", "host_if_name", 64],
79 //            {"crc" : "0xc063ce85"}
80 //        ],
81 //
82 type AfPacketDelete struct {
83         HostIfName []byte `struc:"[64]byte"`
84 }
85
86 func (*AfPacketDelete) GetMessageName() string {
87         return "af_packet_delete"
88 }
89 func (*AfPacketDelete) GetMessageType() api.MessageType {
90         return api.RequestMessage
91 }
92 func (*AfPacketDelete) GetCrcString() string {
93         return "c063ce85"
94 }
95 func NewAfPacketDelete() api.Message {
96         return &AfPacketDelete{}
97 }
98
99 // AfPacketDeleteReply represents the VPP binary API message 'af_packet_delete_reply'.
100 // Generated from 'bin_api/af_packet.api.json', line 29:
101 //
102 //        ["af_packet_delete_reply",
103 //            ["u16", "_vl_msg_id"],
104 //            ["u32", "context"],
105 //            ["i32", "retval"],
106 //            {"crc" : "0x1a80431a"}
107 //        ]
108 //
109 type AfPacketDeleteReply struct {
110         Retval int32
111 }
112
113 func (*AfPacketDeleteReply) GetMessageName() string {
114         return "af_packet_delete_reply"
115 }
116 func (*AfPacketDeleteReply) GetMessageType() api.MessageType {
117         return api.ReplyMessage
118 }
119 func (*AfPacketDeleteReply) GetCrcString() string {
120         return "1a80431a"
121 }
122 func NewAfPacketDeleteReply() api.Message {
123         return &AfPacketDeleteReply{}
124 }