SimpleTorrent
首页
相关页面
结构体
文件
文件列表
全局定义
butil.h
浏览该文件的文档.
1
6
#ifndef BUTIL_H
7
#define BUTIL_H
8
9
#include "
bparser.h
"
10
17
void
print_bcode
(
const
struct
BNode
*node,
int
indent,
int
flag);
18
25
const
struct
BNode
*
query_bcode_by_key
(
const
struct
BNode
*tree,
const
char
*key);
26
32
void
make_info_hash
(
const
struct
BNode
*root,
unsigned
char
*md);
33
34
#endif // BUTIL_H
bparser.h
B 编码 parser 的 API 声明
BNode
B 编码结点
Definition:
bparser.h:39
query_bcode_by_key
const struct BNode * query_bcode_by_key(const struct BNode *tree, const char *key)
搜索 bencode 树中字典里的某个键 key, 返回对应的值结点
Definition:
butil.c:180
make_info_hash
void make_info_hash(const struct BNode *root, unsigned char *md)
计算 torrent 文件的 info hash
Definition:
butil.c:186
print_bcode
void print_bcode(const struct BNode *node, int indent, int flag)
打印以 node 为根的 bencode 树
Definition:
butil.c:128
制作者
1.8.11