forked from beba-eu/beba-switch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ofl-exp-beba.h
626 lines (477 loc) · 20.7 KB
/
ofl-exp-beba.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
#ifndef OFL_EXP_BEBA_H
#define OFL_EXP_BEBA_H 1
#include "../lib/hmap.h"
#include "../udatapath/packet.h"
#include "../udatapath/pipeline.h"
#include "../oflib/ofl-structs.h"
#include "../oflib/ofl-messages.h"
#include "../oflib/oxm-match.h"
#include "../include/openflow/beba-ext.h"
#define MAX_EXTRACTION_FIELD_COUNT 6
#define MAX_STATE_KEY_LEN 48
#define STATE_DEFAULT 0
#define STATE_NULL UINT32_MAX
/**************************************************************************/
/* experimenter messages ofl_exp */
/**************************************************************************/
struct ofl_exp_beba_msg_header {
struct ofl_msg_experimenter header; /* BEBA_VENDOR_ID */
uint32_t type;
};
struct ofl_exp_beba_msg_multipart_request {
struct ofl_msg_multipart_request_experimenter header; /* BEBA_VENDOR_ID */
uint32_t type;
};
struct ofl_exp_beba_msg_multipart_reply {
struct ofl_msg_multipart_reply_experimenter header; /* BEBA_VENDOR_ID */
uint32_t type;
};
/************************
* state mod messages
************************/
struct ofl_exp_msg_state_mod {
struct ofl_exp_beba_msg_header header; /* OFP_EXP_STATE_MOD */
enum ofp_exp_msg_state_mod_commands command;
uint8_t payload[13+OFPSC_MAX_KEY_LEN]; //ugly! for now it's ok XXX
};
struct ofl_exp_stateful_table_config {
uint8_t table_id;
uint8_t stateful;
};
struct ofl_exp_set_extractor {
uint8_t table_id;
uint8_t bit;
uint32_t field_count;
uint32_t fields[OFPSC_MAX_FIELD_COUNT];
};
struct ofl_exp_set_flow_state {
uint8_t table_id;
uint32_t key_len;
uint32_t state;
uint32_t state_mask;
uint32_t hard_rollback;
uint32_t idle_rollback;
uint32_t hard_timeout;
uint32_t idle_timeout;
uint8_t key[OFPSC_MAX_KEY_LEN];
};
struct ofl_exp_del_flow_state {
uint8_t table_id;
uint32_t key_len;
uint8_t key[OFPSC_MAX_KEY_LEN];
};
struct ofl_exp_set_global_state {
uint32_t global_state;
uint32_t global_state_mask;
};
/************************
* pkttmp mod messages
************************/
struct ofl_exp_msg_pkttmp_mod {
struct ofl_exp_beba_msg_header header; /* OFP_EXP_PKTTMP_MOD */
enum ofp_exp_msg_pkttmp_mod_commands command;
uint8_t payload[12]; //(sizeof(ofl_exp_add_pkttmp)) ugly! for now it's ok XXX
};
struct ofl_exp_add_pkttmp {
uint32_t pkttmp_id;
size_t data_length;
uint8_t *data;
};
struct ofl_exp_del_pkttmp {
uint32_t pkttmp_id;
};
/*************************
* Multipart reply message: State entry statistics
*************************/
struct ofl_exp_state_entry{
uint8_t key_len;
uint8_t key[OFPSC_MAX_KEY_LEN];
uint32_t state;
};
struct ofl_exp_state_stats {
uint8_t table_id; /* ID of table flow came from. */
uint32_t duration_sec; /* Time state entry has been alive in secs. */
uint32_t duration_nsec; /* Time state entry has been alive in nsecs beyond duration_sec. */
uint32_t hard_rollback;
uint32_t idle_rollback;
uint32_t hard_timeout; /* Number of seconds before expiration. */
uint32_t idle_timeout; /* Number of seconds idle before expiration. */
struct ofl_exp_state_entry entry; /* Description of the state entry. */
};
struct ofl_exp_msg_multipart_request_state {
struct ofl_exp_beba_msg_multipart_request header; /* OFPMP_STATE */
uint8_t table_id; /* ID of table to read
(from ofp_table_multipart), 0xff for all
tables. */
uint8_t get_from_state;
uint32_t state;
struct ofl_match_header *match; /* Fields to match. */
};
struct ofl_exp_msg_multipart_reply_state {
struct ofl_exp_beba_msg_multipart_reply header; /* OFPMP_STATE */
size_t stats_num;
struct ofl_exp_state_stats **stats;
};
struct ofl_exp_msg_multipart_request_global_state {
struct ofl_exp_beba_msg_multipart_request header; /* OFPMP_GLOBAL_STATE */
};
struct ofl_exp_msg_multipart_reply_global_state {
struct ofl_exp_beba_msg_multipart_reply header; /* OFPMP_GLOBAL_STATE */
uint32_t global_state;
};
/*************************************************************************/
/* experimenter actions ofl_exp */
/*************************************************************************/
struct ofl_exp_beba_act_header {
struct ofl_action_experimenter header; /* BEBA_VENDOR_ID */
uint32_t act_type;
};
struct ofl_exp_action_set_state {
struct ofl_exp_beba_act_header header; /* OFPAT_EXP_SET_STATE */
uint32_t state;
uint32_t state_mask;
uint8_t table_id; /*we have 64 flow table in the pipeline*/
uint32_t hard_rollback;
uint32_t idle_rollback;
uint32_t hard_timeout;
uint32_t idle_timeout;
uint8_t bit;
};
struct ofl_exp_action_set_global_state {
struct ofl_exp_beba_act_header header; /* OFPAT_EXP_SET_GLOBAL_STATE */
uint32_t global_state;
uint32_t global_state_mask;
};
struct ofl_exp_action_inc_state {
struct ofl_exp_beba_act_header header; /* OFPAT_EXP_INC_STATE */
uint8_t table_id;
};
/*************************************************************************/
/* experimenter state table */
/*************************************************************************/
struct key_extractor {
uint8_t table_id;
uint8_t bit;
uint32_t field_count;
uint32_t fields[MAX_EXTRACTION_FIELD_COUNT];
uint32_t key_len;
};
struct state_entry {
struct hmap_node hmap_node;
uint8_t key[MAX_STATE_KEY_LEN];
uint32_t state;
struct ofl_exp_state_stats *stats;
uint64_t created; /* time the entry was created at [us] */
uint64_t remove_at; /* time the entry should be removed at
due to its hard timeout. [us] */
uint64_t last_used; /* last time the flow entry matched a packet [us]*/
};
struct state_table {
struct key_extractor lookup_key_extractor;
struct key_extractor update_key_extractor;
struct key_extractor bit_update_key_extractor;
struct hmap state_entries;
struct state_entry default_state_entry;
struct state_entry null_state_entry;
struct state_entry * last_lookup_state_entry;
bool update_scope_is_eq_lookup_scope;
bool bit_update_scope_is_eq_lookup_scope;
uint8_t stateful;
};
/*************************************************************************/
/* experimenter notifications */
/*************************************************************************/
/* State Sync: Notify the controller about a state change. */
struct ofl_exp_msg_notify_state_change {
struct ofl_exp_beba_msg_header header;
uint8_t table_id;
uint32_t old_state;
uint32_t new_state;
uint32_t state_mask;
uint32_t key_len;
uint8_t key[OFPSC_MAX_KEY_LEN];
};
/* State Sync: Notify the controller about a flow change. */
struct ofl_exp_msg_notify_flow_change {
struct ofl_exp_beba_msg_header header;
uint32_t table_id;
uint32_t ntf_type;
struct ofl_match_header *match;
uint32_t instruction_num;
uint32_t * instructions;
};
/*experimenter table functions*/
bool __extract_key(uint8_t *, struct key_extractor *, struct packet *);
struct state_table *
state_table_create(void);
void
state_table_destroy(struct state_table *);
bool state_table_is_enabled(struct state_table *table);
struct state_entry *
state_table_lookup(struct state_table*, struct packet *);
static inline
void state_table_write_state_header(struct state_entry *entry, uint32_t *state)
{
*state = entry->state;
}
bool
extractors_are_equal(struct key_extractor *ke1, struct key_extractor *ke2);
void
state_table_flush(struct state_table *table, uint64_t now_us);
/*
* State Sync: One extra argument (i.e., ntf_message) is passed at the end of this function.
*/
ofl_err
state_table_set_state(struct state_table *, struct packet *, struct ofl_exp_set_flow_state *msg, struct ofl_exp_action_set_state *act, struct ofl_exp_msg_notify_state_change * ntf_message);
ofl_err
state_table_inc_state(struct state_table *, struct packet *);
ofl_err
state_table_configure_stateful(struct state_table *table, uint8_t stateful);
ofl_err
state_table_set_extractor(struct state_table *, struct key_extractor *, int);
ofl_err
state_table_del_state(struct state_table *, uint8_t *, uint32_t);
/*experimenter message functions*/
int
ofl_exp_beba_msg_pack(struct ofl_msg_experimenter const *msg, uint8_t **buf, size_t *buf_len, struct ofl_exp const *exp);
ofl_err
ofl_exp_beba_msg_unpack(struct ofp_header const *oh, size_t *len, struct ofl_msg_experimenter **msg, struct ofl_exp const *exp);
int
ofl_exp_beba_msg_free(struct ofl_msg_experimenter *msg);
char *
ofl_exp_beba_msg_to_string(struct ofl_msg_experimenter const *msg, struct ofl_exp const *exp);
/*experimenter action functions*/
int
ofl_exp_beba_act_pack(struct ofl_action_header const *src, struct ofp_action_header *dst);
ofl_err
ofl_exp_beba_act_unpack(struct ofp_action_header const *src, size_t *len, struct ofl_action_header **dst);
size_t
ofl_exp_beba_act_ofp_len(struct ofl_action_header const *act);
int
ofl_exp_beba_act_free(struct ofl_action_header *act);
char *
ofl_exp_beba_act_to_string(struct ofl_action_header const *act);
/*experimenter stats functions*/
int
ofl_exp_beba_stats_req_pack(struct ofl_msg_multipart_request_experimenter const *ext, uint8_t **buf, size_t *buf_len, struct ofl_exp const *exp);
int
ofl_exp_beba_stats_reply_pack(struct ofl_msg_multipart_reply_experimenter const *ext, uint8_t **buf, size_t *buf_len, struct ofl_exp const *exp);
char *
ofl_exp_beba_stats_request_to_string(struct ofl_msg_multipart_request_experimenter const *ext, struct ofl_exp const *exp);
char *
ofl_exp_beba_stats_reply_to_string(struct ofl_msg_multipart_reply_experimenter const *ext, struct ofl_exp const *exp);
ofl_err
ofl_exp_beba_stats_req_unpack(struct ofp_multipart_request const *os, uint8_t const *buf, size_t *len, struct ofl_msg_multipart_request_header **msg, struct ofl_exp const *exp);
ofl_err
ofl_exp_beba_stats_reply_unpack(struct ofp_multipart_reply const *os, uint8_t const *buf, size_t *len, struct ofl_msg_multipart_reply_header **msg, struct ofl_exp const *exp);
int
ofl_exp_beba_stats_req_free(struct ofl_msg_multipart_request_header *msg);
int
ofl_exp_beba_stats_reply_free(struct ofl_msg_multipart_reply_header *msg);
/*experimenter match fields functions*/
int
ofl_exp_beba_field_unpack(struct ofl_match *match, struct oxm_field const *f, void const *experimenter_id, void const *value, void const *mask);
void
ofl_exp_beba_field_pack(struct ofpbuf *buf, struct ofl_match_tlv const *oft);
void
ofl_exp_beba_field_match(struct ofl_match_tlv *f, int *packet_header, int *field_len, uint8_t **flow_val, uint8_t **flow_mask);
void
ofl_exp_beba_field_compare (struct ofl_match_tlv *value, uint8_t **packet_val);
void
ofl_exp_beba_field_match_std (struct ofl_match_tlv *flow_mod_match, struct ofl_match_tlv *flow_entry_match, int *field_len, uint8_t **flow_mod_val, uint8_t **flow_entry_val, uint8_t **flow_mod_mask, uint8_t **flow_entry_mask);
void
ofl_exp_beba_field_overlap_a (struct ofl_match_tlv *f_a, int *field_len, uint8_t **val_a, uint8_t **mask_a, int *header, int *header_m, uint64_t *all_mask);
void
ofl_exp_beba_field_overlap_b (struct ofl_match_tlv *f_b, int *field_len, uint8_t **val_b, uint8_t **mask_b, uint64_t *all_mask);
/*
* Handles a state_mod message
* State Sync: One extra argument (i.e., ntf_message) is passed at the end of this function
*/
ofl_err
handle_state_mod(struct pipeline *pl, struct ofl_exp_msg_state_mod *msg, const struct sender *sender, struct ofl_exp_msg_notify_state_change * ntf_message);
/* Handles a state stats request. */
ofl_err
handle_stats_request_state(struct pipeline *pl, struct ofl_exp_msg_multipart_request_state *msg, const struct sender *sender, struct ofl_exp_msg_multipart_reply_state **replies, size_t *replies_num);
/* Handles a global state stats request. */
ofl_err
handle_stats_request_global_state(struct pipeline *pl, const struct sender *sender, struct ofl_exp_msg_multipart_reply_global_state *reply);
void
state_table_stats(struct state_table *table, struct ofl_exp_msg_multipart_request_state *msg,
struct ofl_exp_state_stats ***stats, size_t *stats_size, size_t *stats_num, uint8_t table_id, bool delete_entries);
void
state_table_delete_states(struct state_table *table);
size_t
ofl_structs_state_stats_pack(struct ofl_exp_state_stats const *src, uint8_t *dst, struct ofl_exp const *exp);
size_t
ofl_structs_state_stats_short_pack(struct ofl_exp_state_stats const *src, uint8_t *dst, struct ofl_exp const *exp);
size_t
ofl_structs_state_stats_ofp_total_len(struct ofl_exp_state_stats ** stats, size_t stats_num, struct ofl_exp const *exp);
size_t
ofl_structs_state_stats_ofp_len(struct ofl_exp_state_stats *stats, struct ofl_exp const *exp);
size_t
ofl_structs_state_stats_short_ofp_total_len(struct ofl_exp_state_stats ** stats, size_t stats_num, struct ofl_exp const *exp);
size_t
ofl_structs_state_stats_short_ofp_len(struct ofl_exp_state_stats *stats, struct ofl_exp const *exp);
void
ofl_structs_state_entry_print(FILE *stream, uint32_t field, uint8_t *key, uint8_t *offset);
void
ofl_structs_state_entry_print_default(FILE *stream, uint32_t field);
void
ofl_structs_state_stats_print(FILE *stream, struct ofl_exp_state_stats *s, struct ofl_exp const *exp);
void
ofl_structs_state_stats_short_print(FILE *stream, struct ofl_exp_state_stats *s, struct ofl_exp const *exp);
ofl_err
ofl_structs_state_stats_unpack(struct ofp_exp_state_stats const *src, uint8_t const *buf, size_t *len, struct ofl_exp_state_stats **dst, struct ofl_exp const *exp);
ofl_err
ofl_structs_state_stats_short_unpack(struct ofp_exp_state_stats_short const *src, uint8_t const *buf, size_t *len, struct ofl_exp_state_stats **dst, struct ofl_exp const *exp);
ofl_err
ofl_utils_count_ofp_state_stats(void *data, size_t data_len, size_t *count);
ofl_err
ofl_utils_count_ofp_state_stats_short(void *data, size_t data_len, size_t *count);
/* instruction experimenter callback functions */
int
ofl_exp_beba_inst_pack (struct ofl_instruction_header const *src, struct ofp_instruction *dst);
ofl_err
ofl_exp_beba_inst_unpack (struct ofp_instruction const *src, size_t *len, struct ofl_instruction_header **dst);
int
ofl_exp_beba_inst_free (struct ofl_instruction_header *i);
size_t
ofl_exp_beba_inst_ofp_len (struct ofl_instruction_header const *i);
char *
ofl_exp_beba_inst_to_string (struct ofl_instruction_header const *i);
/* Experimenter erorrs callback functions */
void
ofl_exp_beba_error_pack (struct ofl_msg_exp_error const *msg, uint8_t **buf, size_t *buf_len);
void
ofl_exp_beba_error_free (struct ofl_msg_exp_error *msg);
char *
ofl_exp_beba_error_to_string(struct ofl_msg_exp_error const *msg);
void
ofl_exp_stats_type_print(FILE *stream, uint32_t type);
struct ofl_match_tlv *
ofl_structs_match_exp_put8(struct ofl_match *match, uint32_t header, uint32_t experimenter_id, uint8_t value);
struct ofl_match_tlv *
ofl_structs_match_exp_put8m(struct ofl_match *match, uint32_t header, uint32_t experimenter_id, uint8_t value, uint8_t mask);
struct ofl_match_tlv *
ofl_structs_match_exp_put16(struct ofl_match *match, uint32_t header, uint32_t experimenter_id, uint16_t value);
struct ofl_match_tlv *
ofl_structs_match_exp_put16m(struct ofl_match *match, uint32_t header, uint32_t experimenter_id, uint16_t value, uint16_t mask);
struct ofl_match_tlv *
ofl_structs_match_exp_put32(struct ofl_match *match, uint32_t header, uint32_t experimenter_id, uint32_t value);
struct ofl_match_tlv *
ofl_structs_match_exp_put32m(struct ofl_match *match, uint32_t header, uint32_t experimenter_id, uint32_t value, uint32_t mask);
struct ofl_match_tlv *
ofl_structs_match_exp_put64(struct ofl_match *match, uint32_t header, uint32_t experimenter_id, uint64_t value);
struct ofl_match_tlv *
ofl_structs_match_exp_put64m(struct ofl_match *match, uint32_t header, uint32_t experimenter_id, uint64_t value, uint64_t mask);
/*************************************************************************/
/* experimenter instructions ofl_exp */
/*************************************************************************/
struct ofl_exp_beba_instr_header {
struct ofl_instruction_experimenter header; /* BEBA_VENDOR_ID */
uint32_t instr_type;
};
struct ofl_exp_instruction_in_switch_pkt_gen {
struct ofl_exp_beba_instr_header header; /* OFPIT_EXP_IN_SWITCH_PKT_GEN*/
uint32_t pkttmp_id;
size_t actions_num;
struct ofl_action_header **actions;
};
/*************************************************************************/
/* experimenter pkttmp table */
/*************************************************************************/
struct pkttmp_table {
struct datapath *dp;
//struct ofl_msg_multipart_reply_group_features *features;
size_t entries_num;
struct hmap entries;
};
struct pkttmp_entry {
struct hmap_node node;
uint32_t pkttmp_id;
struct datapath *dp;
struct pkttmp_table *table;
uint64_t created;
uint8_t *data; /* to check if it is good for tmp implementation */
size_t data_length;
};
/* experimenter pkttmp table functions*/
struct pkttmp_table *
pkttmp_table_create(struct datapath *dp);
void
pkttmp_table_destroy(struct pkttmp_table *table);
/* experimenter pkttmp entry functions */
struct pkttmp_entry *
pkttmp_entry_create(struct datapath *dp, struct pkttmp_table *table, struct ofl_exp_add_pkttmp *mod);
void
pkttmp_entry_destroy(struct pkttmp_entry *entry);
ofl_err
handle_pkttmp_mod(struct pipeline *pl, struct ofl_exp_msg_pkttmp_mod *msg,
const struct sender *sender);
uint32_t
get_experimenter_id(struct ofl_msg_header const *msg);
uint32_t
get_experimenter_id_from_match(struct ofl_match const *flow_mod_match);
uint32_t
get_experimenter_id_from_action(struct ofl_instruction_actions const *act);
/*experimenter match fields*/
static inline void
oxm_put_exp_header(struct ofpbuf *buf, uint32_t header, uint32_t experimenter_id)
{
uint32_t n_header = htonl(header);
ofpbuf_put(buf, &n_header, sizeof n_header);
ofpbuf_put(buf, &experimenter_id, EXP_ID_LEN);
}
static inline void
oxm_put_exp_8(struct ofpbuf *buf, uint32_t header, uint32_t experimenter_id, uint8_t value)
{
oxm_put_exp_header(buf, header, experimenter_id);
ofpbuf_put(buf, &value, sizeof value);
}
static inline void
oxm_put_exp_8w(struct ofpbuf *buf, uint32_t header, uint32_t experimenter_id, uint8_t value, uint8_t mask)
{
oxm_put_exp_header(buf, header, experimenter_id);
ofpbuf_put(buf, &value, sizeof value);
ofpbuf_put(buf, &mask, sizeof mask);
}
static inline void
oxm_put_exp_16(struct ofpbuf *buf, uint32_t header, uint32_t experimenter_id, uint16_t value)
{
oxm_put_exp_header(buf, header, experimenter_id);
ofpbuf_put(buf, &value, sizeof value);
}
static inline void
oxm_put_exp_16w(struct ofpbuf *buf, uint32_t header, uint32_t experimenter_id, uint16_t value, uint16_t mask)
{
oxm_put_exp_header(buf, header, experimenter_id);
ofpbuf_put(buf, &value, sizeof value);
ofpbuf_put(buf, &mask, sizeof mask);
}
static inline void
oxm_put_exp_32(struct ofpbuf *buf, uint32_t header, uint32_t experimenter_id, uint32_t value)
{
oxm_put_exp_header(buf, header, experimenter_id);
ofpbuf_put(buf, &value, sizeof value);
}
static inline void
oxm_put_exp_32w(struct ofpbuf *buf, uint32_t header, uint32_t experimenter_id, uint32_t value, uint32_t mask)
{
oxm_put_exp_header(buf, header, experimenter_id);
ofpbuf_put(buf, &value, sizeof value);
ofpbuf_put(buf, &mask, sizeof mask);
}
static inline void
oxm_put_exp_64(struct ofpbuf *buf, uint32_t header, uint32_t experimenter_id, uint64_t value)
{
oxm_put_exp_header(buf, header, experimenter_id);
ofpbuf_put(buf, &value, sizeof value);
}
static inline void
oxm_put_exp_64w(struct ofpbuf *buf, uint32_t header, uint32_t experimenter_id, uint64_t value, uint64_t mask)
{
oxm_put_exp_header(buf, header, experimenter_id);
ofpbuf_put(buf, &value, sizeof value);
ofpbuf_put(buf, &mask, sizeof mask);
}
#endif /* OFL_EXP_BEBA_H */