60 #ifndef __RUDOLPH2_H__
61 #define __RUDOLPH2_H__
70 RUDOLPH2_FLAG_NEWFILE,
71 RUDOLPH2_FLAG_LASTCHUNK,
74 struct rudolph2_callbacks {
75 void (* write_chunk)(
struct rudolph2_conn *c,
int offset,
int flag,
76 uint8_t *data,
int len);
77 int (* read_chunk)(
struct rudolph2_conn *c,
int offset, uint8_t *to,
81 #define RUDOLPH2_DATASIZE 64
83 struct rudolph2_conn {
85 const struct rudolph2_callbacks *cb;
87 uint16_t snd_nxt, rcv_nxt;
89 uint8_t hops_from_base;
94 void rudolph2_open(
struct rudolph2_conn *c, uint16_t channel,
95 const struct rudolph2_callbacks *cb);
96 void rudolph2_close(
struct rudolph2_conn *c);
97 void rudolph2_send(
struct rudolph2_conn *c, clock_time_t interval);
98 void rudolph2_stop(
struct rudolph2_conn *c);
100 void rudolph2_set_version(
struct rudolph2_conn *c,
int version);
101 int rudolph2_version(
struct rudolph2_conn *c);