X-Git-Url: http://the.earth.li/gitweb/?a=blobdiff_plain;f=keystructs.h;h=6c36bbec6e771ad04df2bd3ca73ee192fe2b7709;hb=168d9233fd2efadcb50f76e57f960fb875383fbb;hp=10dfcc627a722f2dab4abedbeb5be4d89e343e97;hpb=8e58a1769ce5e492dd68904dfc81b6e077fc2a3a;p=onak.git diff --git a/keystructs.h b/keystructs.h index 10dfcc6..6c36bbe 100644 --- a/keystructs.h +++ b/keystructs.h @@ -9,9 +9,12 @@ #ifndef __KEYSTRUCTS_H__ #define __KEYSTRUCTS_H__ +#include #include #include +#include "ll.h" + /** * struct openpgp_packet - Stores an OpenPGP packet. * @tag: The packet tag (ie type). @@ -78,4 +81,25 @@ struct openpgp_publickey { struct openpgp_publickey *next; }; +/** + * struct stats_key - holds key details suitable for doing stats on. + * @keyid: The keyid. + * @colour: Used for marking during DFS/BFS. + * @parent: The key that lead us to this one for DFS/BFS. + * @sigs: A linked list of the signatures on this key. + * @gotsigs: A bool indicating if we've initialized the sigs element yet. + * @disabled: If we shouldn't consider the key in calculations. + * @revoked: If the key is revoked (and shouldn't be considered). + */ +struct stats_key { + uint64_t keyid; + int colour; + uint64_t parent; + struct ll *sigs; + struct ll *signs; + bool gotsigs; + bool disabled; + bool revoked; +}; + #endif /* __KEYSTRUCTS_H__ */