Lines Matching refs:tube
2 * util/tube.h - pipe service
47 struct tube;
56 * void mycallback(tube, msg, len, error, user_argument);
59 typedef void tube_callback_t(struct tube*, uint8_t*, size_t, int, void*);
64 struct tube {
127 * @return: new tube struct or NULL on error.
129 struct tube* tube_create(void);
133 * @param tube: to delete
135 void tube_delete(struct tube* tube);
139 * @param tube: the tube to write on.
140 * If that tube is a pipe, its write fd is used as
154 int tube_write_msg(struct tube* tube, uint8_t* buf, uint32_t len,
159 * @param tube: The tube to read on.
160 * If that tube is a pipe, its read fd is used as
174 int tube_read_msg(struct tube* tube, uint8_t** buf, uint32_t* len,
179 * The tube can no longer be read from.
180 * @param tube: tube to operate on.
182 void tube_close_read(struct tube* tube);
186 * The tube can no longer be written to.
187 * @param tube: tube to operate on.
189 void tube_close_write(struct tube* tube);
192 * See if data is ready for reading on the tube without blocking.
193 * @param tube: tube to check for readable items
197 int tube_poll(struct tube* tube);
200 * Wait for data to be ready for reading on the tube. is blocking.
202 * @param tube: the tube to wait on.
206 int tube_wait(struct tube* tube);
210 * @param tube
213 int tube_read_fd(struct tube* tube);
219 * @param tube: tube to listen on
225 int tube_setup_bg_listen(struct tube* tube, struct comm_base* base,
230 * @param tube: what tube to cleanup
232 void tube_remove_bg_listen(struct tube* tube);
237 * @param tube: tube to write on
241 int tube_setup_bg_write(struct tube* tube, struct comm_base* base);
245 * @param tube: what tube to cleanup
247 void tube_remove_bg_write(struct tube* tube);
254 * @param tube: what tube to queue on.
260 int tube_queue_item(struct tube* tube, uint8_t* msg, size_t len);