aa847e4b93935900dec4e90e02599da088a03843
[govpp.git] / examples / bin_api / memif / memif.go
1 // Package memif represents the VPP binary API of the 'memif' VPP module.
2 // DO NOT EDIT. Generated from 'bin_api/memif.api.json'
3 package memif
4
5 import "git.fd.io/govpp.git/api"
6
7 // VlApiVersion contains version of the API.
8 const VlAPIVersion = 0xed3def5d
9
10 // MemifCreate represents the VPP binary API message 'memif_create'.
11 // Generated from 'bin_api/memif.api.json', line 6:
12 //
13 //        ["memif_create",
14 //            ["u16", "_vl_msg_id"],
15 //            ["u32", "client_index"],
16 //            ["u32", "context"],
17 //            ["u8", "role"],
18 //            ["u8", "mode"],
19 //            ["u8", "rx_queues"],
20 //            ["u8", "tx_queues"],
21 //            ["u32", "id"],
22 //            ["u8", "socket_filename", 128],
23 //            ["u8", "secret", 24],
24 //            ["u32", "ring_size"],
25 //            ["u16", "buffer_size"],
26 //            ["u8", "hw_addr", 6],
27 //            {"crc" : "0xc809c235"}
28 //        ],
29 //
30 type MemifCreate struct {
31         Role           uint8
32         Mode           uint8
33         RxQueues       uint8
34         TxQueues       uint8
35         ID             uint32
36         SocketFilename []byte `struc:"[128]byte"`
37         Secret         []byte `struc:"[24]byte"`
38         RingSize       uint32
39         BufferSize     uint16
40         HwAddr         []byte `struc:"[6]byte"`
41 }
42
43 func (*MemifCreate) GetMessageName() string {
44         return "memif_create"
45 }
46 func (*MemifCreate) GetMessageType() api.MessageType {
47         return api.RequestMessage
48 }
49 func (*MemifCreate) GetCrcString() string {
50         return "c809c235"
51 }
52 func NewMemifCreate() api.Message {
53         return &MemifCreate{}
54 }
55
56 // MemifCreateReply represents the VPP binary API message 'memif_create_reply'.
57 // Generated from 'bin_api/memif.api.json', line 22:
58 //
59 //        ["memif_create_reply",
60 //            ["u16", "_vl_msg_id"],
61 //            ["u32", "context"],
62 //            ["i32", "retval"],
63 //            ["u32", "sw_if_index"],
64 //            {"crc" : "0x93d7498b"}
65 //        ],
66 //
67 type MemifCreateReply struct {
68         Retval    int32
69         SwIfIndex uint32
70 }
71
72 func (*MemifCreateReply) GetMessageName() string {
73         return "memif_create_reply"
74 }
75 func (*MemifCreateReply) GetMessageType() api.MessageType {
76         return api.ReplyMessage
77 }
78 func (*MemifCreateReply) GetCrcString() string {
79         return "93d7498b"
80 }
81 func NewMemifCreateReply() api.Message {
82         return &MemifCreateReply{}
83 }
84
85 // MemifDelete represents the VPP binary API message 'memif_delete'.
86 // Generated from 'bin_api/memif.api.json', line 29:
87 //
88 //        ["memif_delete",
89 //            ["u16", "_vl_msg_id"],
90 //            ["u32", "client_index"],
91 //            ["u32", "context"],
92 //            ["u32", "sw_if_index"],
93 //            {"crc" : "0x12814e3d"}
94 //        ],
95 //
96 type MemifDelete struct {
97         SwIfIndex uint32
98 }
99
100 func (*MemifDelete) GetMessageName() string {
101         return "memif_delete"
102 }
103 func (*MemifDelete) GetMessageType() api.MessageType {
104         return api.RequestMessage
105 }
106 func (*MemifDelete) GetCrcString() string {
107         return "12814e3d"
108 }
109 func NewMemifDelete() api.Message {
110         return &MemifDelete{}
111 }
112
113 // MemifDeleteReply represents the VPP binary API message 'memif_delete_reply'.
114 // Generated from 'bin_api/memif.api.json', line 36:
115 //
116 //        ["memif_delete_reply",
117 //            ["u16", "_vl_msg_id"],
118 //            ["u32", "context"],
119 //            ["i32", "retval"],
120 //            {"crc" : "0x72c9fa3c"}
121 //        ],
122 //
123 type MemifDeleteReply struct {
124         Retval int32
125 }
126
127 func (*MemifDeleteReply) GetMessageName() string {
128         return "memif_delete_reply"
129 }
130 func (*MemifDeleteReply) GetMessageType() api.MessageType {
131         return api.ReplyMessage
132 }
133 func (*MemifDeleteReply) GetCrcString() string {
134         return "72c9fa3c"
135 }
136 func NewMemifDeleteReply() api.Message {
137         return &MemifDeleteReply{}
138 }
139
140 // MemifDetails represents the VPP binary API message 'memif_details'.
141 // Generated from 'bin_api/memif.api.json', line 42:
142 //
143 //        ["memif_details",
144 //            ["u16", "_vl_msg_id"],
145 //            ["u32", "context"],
146 //            ["u32", "sw_if_index"],
147 //            ["u8", "if_name", 64],
148 //            ["u8", "hw_addr", 6],
149 //            ["u32", "id"],
150 //            ["u8", "role"],
151 //            ["u8", "mode"],
152 //            ["u8", "socket_filename", 128],
153 //            ["u32", "ring_size"],
154 //            ["u16", "buffer_size"],
155 //            ["u8", "admin_up_down"],
156 //            ["u8", "link_up_down"],
157 //            {"crc" : "0x4d74fd96"}
158 //        ],
159 //
160 type MemifDetails struct {
161         SwIfIndex      uint32
162         IfName         []byte `struc:"[64]byte"`
163         HwAddr         []byte `struc:"[6]byte"`
164         ID             uint32
165         Role           uint8
166         Mode           uint8
167         SocketFilename []byte `struc:"[128]byte"`
168         RingSize       uint32
169         BufferSize     uint16
170         AdminUpDown    uint8
171         LinkUpDown     uint8
172 }
173
174 func (*MemifDetails) GetMessageName() string {
175         return "memif_details"
176 }
177 func (*MemifDetails) GetMessageType() api.MessageType {
178         return api.ReplyMessage
179 }
180 func (*MemifDetails) GetCrcString() string {
181         return "4d74fd96"
182 }
183 func NewMemifDetails() api.Message {
184         return &MemifDetails{}
185 }
186
187 // MemifDump represents the VPP binary API message 'memif_dump'.
188 // Generated from 'bin_api/memif.api.json', line 58:
189 //
190 //        ["memif_dump",
191 //            ["u16", "_vl_msg_id"],
192 //            ["u32", "client_index"],
193 //            ["u32", "context"],
194 //            {"crc" : "0x68d39e95"}
195 //        ]
196 //
197 type MemifDump struct {
198 }
199
200 func (*MemifDump) GetMessageName() string {
201         return "memif_dump"
202 }
203 func (*MemifDump) GetMessageType() api.MessageType {
204         return api.RequestMessage
205 }
206 func (*MemifDump) GetCrcString() string {
207         return "68d39e95"
208 }
209 func NewMemifDump() api.Message {
210         return &MemifDump{}
211 }