--- libaitio/inc/aitio.h 2013/12/12 09:04:21 1.38.10.12 +++ libaitio/inc/aitio.h 2013/12/12 14:56:38 1.38.10.13 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitio.h,v 1.38.10.12 2013/12/12 09:04:21 misho Exp $ +* $Id: aitio.h,v 1.38.10.13 2013/12/12 14:56:38 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -78,6 +78,17 @@ SUCH DAMAGE. #define IO_ETHER_FILTER_WRITE 2 +typedef struct { + unsigned int prog_inin; /* init progs */ + unsigned int prog_maxn; /* max progs */ + unsigned int prog_cnum; /* current progs */ + char prog_name[PATH_MAX]; + + pthread_mutex_t prog_mtx; + array_t *prog_fds; + unsigned int *prog_used; +} prog_t; + typedef struct tagCliSock sock_cli_t; typedef void *(*sock_cb_t)(sock_cli_t*); struct tagCliSock { @@ -107,6 +118,7 @@ typedef struct { sockaddr_t sock_peer; ait_val_t sock_buf; + prog_t *sock_prog; volatile intptr_t sock_kill; sched_root_task_t *sock_root; @@ -114,17 +126,6 @@ typedef struct { pthread_mutex_t sock_mtx; TAILQ_HEAD(, tagCliSock) sock_cli; } sock_t; - -typedef struct { - unsigned int prog_inin; /* init progs */ - unsigned int prog_maxn; /* max progs */ - unsigned int prog_cnum; /* current progs */ - char prog_name[PATH_MAX]; - - pthread_mutex_t prog_mtx; - array_t *prog_fds; - unsigned int *prog_used; -} prog_t; // io_GetErrno() Get error code of last operation