Advertisement
AnthonyCagliano

Untitled

Oct 24th, 2022
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. typedef struct _asn1_obj_t {
  2. bool f_class:2;
  3. bool f_constr:1;
  4. uint8_t tag;
  5. size_t len;
  6. uint8_t *data;
  7. } asn1_obj_t;
  8.  
  9.  
  10. // some code
  11. node_o->tag = tag & 0b11111;
  12. node_o->f_constr = (tag>>5 & 1);
  13. node_o->f_class = (tag>>6 & 0b11);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement