xref: /freebsd/contrib/libxo/encoder/test/enc_test.c (revision ec0ea6efa1ad229d75c394c1a9b9cac33af2b1d3)
1 /*
2  * Copyright (c) 2015, Juniper Networks, Inc.
3  * All rights reserved.
4  * This SOFTWARE is licensed under the LICENSE provided in the
5  * ../Copyright file. By downloading, installing, copying, or otherwise
6  * using the SOFTWARE, you agree to be bound by the terms of that
7  * LICENSE.
8  * Phil Shafer, August 2015
9  */
10 
11 #include "xo.h"
12 #include "xo_encoder.h"
13 
14 static int
15 test_handler (XO_ENCODER_HANDLER_ARGS)
16 {
17     printf("op %s: [%s] [%s] [%#llx]\n", xo_encoder_op_name(op),
18 	   name ?: "", value ?: "", (unsigned long long) flags);
19 
20     return 0;
21 }
22 
23 int
24 xo_encoder_library_init (XO_ENCODER_INIT_ARGS)
25 {
26     arg->xei_version = XO_ENCODER_VERSION;
27     arg->xei_handler = test_handler;
28 
29     return 0;
30 }
31