/src/open5gs/lib/asn1c/common/OBJECT_IDENTIFIER_print.c
Line | Count | Source |
1 | | /* |
2 | | * Copyright (c) 2017 Lev Walkin <vlm@lionet.info>. |
3 | | * All rights reserved. |
4 | | * Redistribution and modifications are permitted subject to BSD license. |
5 | | */ |
6 | | #include <asn_internal.h> |
7 | | #include <OBJECT_IDENTIFIER.h> |
8 | | |
9 | | int |
10 | | OBJECT_IDENTIFIER_print(const asn_TYPE_descriptor_t *td, const void *sptr, |
11 | | int ilevel, asn_app_consume_bytes_f *cb, |
12 | 0 | void *app_key) { |
13 | 0 | const OBJECT_IDENTIFIER_t *st = (const OBJECT_IDENTIFIER_t *)sptr; |
14 | |
|
15 | 0 | (void)td; /* Unused argument */ |
16 | 0 | (void)ilevel; /* Unused argument */ |
17 | |
|
18 | 0 | if(!st || !st->buf) |
19 | 0 | return (cb("<absent>", 8, app_key) < 0) ? -1 : 0; |
20 | | |
21 | | /* Dump preamble */ |
22 | 0 | if(cb("{ ", 2, app_key) < 0) |
23 | 0 | return -1; |
24 | | |
25 | 0 | if(OBJECT_IDENTIFIER__dump_body(st, cb, app_key) < 0) { |
26 | 0 | return -1; |
27 | 0 | } |
28 | | |
29 | 0 | return (cb(" }", 2, app_key) < 0) ? -1 : 0; |
30 | 0 | } |