SimpleTorrent
|
基于 B 编码语法树的工具函数声明 更多...
#include "bparser.h"
函数 | |
void | print_bcode (const struct BNode *node, int indent, int flag) |
打印以 node 为根的 bencode 树 更多... | |
const struct BNode * | query_bcode_by_key (const struct BNode *tree, const char *key) |
搜索 bencode 树中字典里的某个键 key, 返回对应的值结点 更多... | |
void | make_info_hash (const struct BNode *root, unsigned char *md) |
计算 torrent 文件的 info hash 更多... | |
基于 B 编码语法树的工具函数声明
void make_info_hash | ( | const struct BNode * | root, |
unsigned char * | md | ||
) |
计算 torrent 文件的 info hash
root | 语法树根 |
md | sha1 输出缓冲区(至少 HASH_SIZE 字节) |
void print_bcode | ( | const struct BNode * | node, |
int | indent, | ||
int | flag | ||
) |
打印以 node 为根的 bencode 树
node | 语法树根结点 |
indent | 起始缩进 |
flag | 特殊打印要求 |