version 1.23.6.7, 2014/12/19 02:12:49
|
version 1.24.2.2, 2015/01/15 20:37:14
|
Line 12 terms:
|
Line 12 terms:
|
All of the documentation and software included in the ELWIX and AITNET |
All of the documentation and software included in the ELWIX and AITNET |
Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org> |
Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org> |
|
|
Copyright 2004 - 2014 | Copyright 2004 - 2015 |
by Michael Pounov <misho@elwix.org>. All rights reserved. |
by Michael Pounov <misho@elwix.org>. All rights reserved. |
|
|
Redistribution and use in source and binary forms, with or without |
Redistribution and use in source and binary forms, with or without |
Line 63 static void *txUDPPacket(sched_task_t *);
|
Line 63 static void *txUDPPacket(sched_task_t *);
|
static void *rxBPFPacket(sched_task_t *); |
static void *rxBPFPacket(sched_task_t *); |
static void *txBPFPacket(sched_task_t *); |
static void *txBPFPacket(sched_task_t *); |
|
|
static sched_task_func_t cbProto[SOCK_BPF + 1][4] = { | /* SOCK_PIPE */ |
| |
| static sched_task_func_t cbProto[SOCK_MAX_SUPPORT][4] = { |
{ acceptClients, closeClient, rxPacket, txPacket }, /* SOCK_STREAM */ |
{ acceptClients, closeClient, rxPacket, txPacket }, /* SOCK_STREAM */ |
{ acceptClients, closeClient, rxPacket, txPacket }, /* SOCK_STREAM */ |
{ acceptClients, closeClient, rxPacket, txPacket }, /* SOCK_STREAM */ |
{ rxUDPPacket, freeClient, rxUDPPacket, txUDPPacket }, /* SOCK_DGRAM */ |
{ rxUDPPacket, freeClient, rxUDPPacket, txUDPPacket }, /* SOCK_DGRAM */ |
{ NULL, NULL, NULL, NULL }, /* SOCK_RAW */ |
{ NULL, NULL, NULL, NULL }, /* SOCK_RAW */ |
{ rxBPFPacket, freeClient, rxBPFPacket, txBPFPacket } /* SOCK_BPF */ | { rxBPFPacket, freeClient, rxBPFPacket, txBPFPacket }, /* SOCK_BPF */ |
| { NULL, NULL, NULL, NULL } /* SOCK_PIPE */ |
}; |
}; |
|
|
/* Global Signal Argument when kqueue support disabled */ |
/* Global Signal Argument when kqueue support disabled */ |
Line 729 rxBPFPacket(sched_task_t *task)
|
Line 732 rxBPFPacket(sched_task_t *task)
|
rlen = read(TASK_FD(task), AIT_GET_BUF(&b), AIT_LEN(&b)); |
rlen = read(TASK_FD(task), AIT_GET_BUF(&b), AIT_LEN(&b)); |
h = (struct bpf_hdr*) AIT_GET_BUF(&b); |
h = (struct bpf_hdr*) AIT_GET_BUF(&b); |
rlen -= h->bh_hdrlen; |
rlen -= h->bh_hdrlen; |
if (rlen < h->bh_caplen || h->bh_caplen != h->bh_datalen || | if (rlen < h->bh_datalen || h->bh_caplen != h->bh_datalen || |
rlen < ETHER_HDR_LEN + sizeof(struct tagRPCCall)) { |
rlen < ETHER_HDR_LEN + sizeof(struct tagRPCCall)) { |
rpc_SetErr(ERPCMISMATCH, "Short RPC packet"); |
rpc_SetErr(ERPCMISMATCH, "Short RPC packet"); |
goto end; |
goto end; |
Line 1242 rpc_srv_initServer(u_char InstID, int concurentClients
|
Line 1245 rpc_srv_initServer(u_char InstID, int concurentClients
|
rpc_srv_t *srv = NULL; |
rpc_srv_t *srv = NULL; |
sockaddr_t sa = E_SOCKADDR_INIT; |
sockaddr_t sa = E_SOCKADDR_INIT; |
|
|
if (!concurentClients || (proto < 0 || proto > SOCK_DGRAM)) { | if (!concurentClients || (proto < 0 || proto > SOCK_RAW)) { |
rpc_SetErr(EINVAL, "Invalid parameters can`t init RPC server"); |
rpc_SetErr(EINVAL, "Invalid parameters can`t init RPC server"); |
return NULL; |
return NULL; |
} |
} |