Contents of /trunk/mkinitrd-magellan/busybox/networking/isrv.h
Parent Directory | Revision Log
Revision 532 -
(show annotations)
(download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 8 months ago) by niro
File MIME type: text/plain
File size: 953 byte(s)
Sat Sep 1 22:45:15 2007 UTC (16 years, 8 months ago) by niro
File MIME type: text/plain
File size: 953 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd
1 | /* vi: set sw=4 ts=4: */ |
2 | /* |
3 | * Generic non-forking server infrastructure. |
4 | * Intended to make writing telnetd-type servers easier. |
5 | * |
6 | * Copyright (C) 2007 Denis Vlasenko |
7 | * |
8 | * Licensed under GPL version 2, see file LICENSE in this tarball for details. |
9 | */ |
10 | |
11 | /* opaque structure */ |
12 | struct isrv_state_t; |
13 | typedef struct isrv_state_t isrv_state_t; |
14 | |
15 | /* callbacks */ |
16 | void isrv_want_rd(isrv_state_t *state, int fd); |
17 | void isrv_want_wr(isrv_state_t *state, int fd); |
18 | void isrv_dont_want_rd(isrv_state_t *state, int fd); |
19 | void isrv_dont_want_wr(isrv_state_t *state, int fd); |
20 | int isrv_register_fd(isrv_state_t *state, int peer, int fd); |
21 | void isrv_close_fd(isrv_state_t *state, int fd); |
22 | int isrv_register_peer(isrv_state_t *state, void *param); |
23 | |
24 | /* driver */ |
25 | void isrv_run( |
26 | int listen_fd, |
27 | int (*new_peer)(isrv_state_t *state, int fd), |
28 | int (*do_rd)(int fd, void **), |
29 | int (*do_wr)(int fd, void **), |
30 | int (*do_timeout)(void **), |
31 | int timeout, |
32 | int linger_timeout |
33 | ); |