35#if PPP_SUPPORT && PPPOS_SUPPORT
60static
void pppos_connect(ppp_pcb *ppp,
void *
ctx);
62static void pppos_listen(ppp_pcb *ppp,
void *
ctx);
64static void pppos_disconnect(ppp_pcb *ppp,
void *
ctx);
65static err_t pppos_destroy(ppp_pcb *ppp,
void *
ctx);
66static void pppos_send_config(ppp_pcb *ppp,
void *
ctx,
u32_t accm,
int pcomp,
int accomp);
67static void pppos_recv_config(ppp_pcb *ppp,
void *
ctx,
u32_t accm,
int pcomp,
int accomp);
70#if PPP_INPROC_IRQ_SAFE
71static void pppos_input_callback(
void *
arg);
73static void pppos_input_free_current_packet(pppos_pcb *pppos);
74static void pppos_input_drop(pppos_pcb *pppos);
79static const struct link_callbacks pppos_callbacks = {
94#define ESCAPE_P(accm, c) ((accm)[(c) >> 3] & 1 << (c & 0x07))
100static const u16_t fcstab[256] = {
101 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
102 0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7,
103 0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e,
104 0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876,
105 0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd,
106 0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5,
107 0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c,
108 0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974,
109 0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb,
110 0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3,
111 0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a,
112 0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72,
113 0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9,
114 0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1,
115 0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738,
116 0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70,
117 0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7,
118 0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff,
119 0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036,
120 0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e,
121 0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5,
122 0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd,
123 0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134,
124 0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c,
125 0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3,
126 0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb,
127 0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232,
128 0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a,
129 0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1,
130 0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9,
131 0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
132 0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
134#define PPP_FCS(fcs, c) (((fcs) >> 8) ^ fcstab[((fcs) ^ (c)) & 0xff])
137#define PPP_FCS_POLYNOMIAL 0x8408
139ppp_get_fcs(
u8_t byte)
144 for (bit = 8; bit-- > 0; ) {
145 octet = (octet & 0x01) ? ((octet >> 1) ^ PPP_FCS_POLYNOMIAL) : (octet >> 1);
147 return octet & 0xffff;
149#define PPP_FCS(fcs, c) (((fcs) >> 8) ^ ppp_get_fcs(((fcs) ^ (c)) & 0xff))
155#define PPP_INITFCS 0xffff
156#define PPP_GOODFCS 0xf0b8
158#if PPP_INPROC_IRQ_SAFE
159#define PPPOS_DECL_PROTECT(lev) SYS_ARCH_DECL_PROTECT(lev)
160#define PPPOS_PROTECT(lev) SYS_ARCH_PROTECT(lev)
161#define PPPOS_UNPROTECT(lev) SYS_ARCH_UNPROTECT(lev)
163#define PPPOS_DECL_PROTECT(lev)
164#define PPPOS_PROTECT(lev)
165#define PPPOS_UNPROTECT(lev)
174ppp_pcb *pppos_create(
struct netif *pppif, pppos_output_cb_fn output_cb,
175 ppp_link_status_cb_fn link_status_cb,
void *ctx_cb)
186 ppp = ppp_new(pppif, &pppos_callbacks, pppos, link_status_cb, ctx_cb);
192 memset(pppos, 0,
sizeof(pppos_pcb));
194 pppos->output_cb = output_cb;
200pppos_write(ppp_pcb *ppp,
void *
ctx,
struct pbuf *
p)
202 pppos_pcb *pppos = (pppos_pcb *)
ctx;
214 PPPDEBUG(
LOG_WARNING, (
"pppos_write[%d]: alloc fail\n", ppp->netif->num));
230 if ((
sys_now() - pppos->last_xmit) >= PPP_MAXIDLEFLAG) {
231 err = pppos_output_append(pppos,
err, nb, PPP_FLAG, 0,
NULL);
235 fcs_out = PPP_INITFCS;
239 err = pppos_output_append(pppos,
err, nb, *
s++, 1, &fcs_out);
242 err = pppos_output_last(pppos,
err, nb, &fcs_out);
244 PPPDEBUG(
LOG_INFO, (
"pppos_write[%d]: len=%d\n", ppp->netif->num,
p->len));
246 PPPDEBUG(
LOG_WARNING, (
"pppos_write[%d]: output failed len=%d\n", ppp->netif->num,
p->len));
256 pppos_pcb *pppos = (pppos_pcb *)
ctx;
266 PPPDEBUG(
LOG_WARNING, (
"pppos_netif_output[%d]: alloc fail\n", ppp->netif->num));
281 if ((
sys_now() - pppos->last_xmit) >= PPP_MAXIDLEFLAG) {
282 err = pppos_output_append(pppos,
err, nb, PPP_FLAG, 0,
NULL);
285 fcs_out = PPP_INITFCS;
286 if (!pppos->accomp) {
287 err = pppos_output_append(pppos,
err, nb, PPP_ALLSTATIONS, 1, &fcs_out);
288 err = pppos_output_append(pppos,
err, nb, PPP_UI, 1, &fcs_out);
290 if (!pppos->pcomp ||
protocol > 0xFF) {
291 err = pppos_output_append(pppos,
err, nb, (
protocol >> 8) & 0xFF, 1, &fcs_out);
293 err = pppos_output_append(pppos,
err, nb,
protocol & 0xFF, 1, &fcs_out);
296 for(
p = pb;
p;
p =
p->next) {
301 err = pppos_output_append(pppos,
err, nb, *
s++, 1, &fcs_out);
305 err = pppos_output_last(pppos,
err, nb, &fcs_out);
315pppos_connect(ppp_pcb *ppp,
void *
ctx)
317 pppos_pcb *pppos = (pppos_pcb *)
ctx;
318 PPPOS_DECL_PROTECT(lev);
320#if PPP_INPROC_IRQ_SAFE
322 pppos_input_free_current_packet(pppos);
326 memset(&pppos->last_xmit, 0,
sizeof(pppos_pcb) -
offsetof(pppos_pcb, last_xmit));
332 pppos->in_accm[15] = 0x60;
333 pppos->out_accm[15] = 0x60;
336 PPPOS_UNPROTECT(lev);
341 PPPDEBUG(
LOG_INFO, (
"pppos_connect: unit %d: connecting\n", ppp->netif->num));
347pppos_listen(ppp_pcb *ppp,
void *
ctx)
349 pppos_pcb *pppos = (pppos_pcb *)
ctx;
350 PPPOS_DECL_PROTECT(lev);
352#if PPP_INPROC_IRQ_SAFE
354 pppos_input_free_current_packet(pppos);
358 memset(&pppos->last_xmit, 0,
sizeof(pppos_pcb) -
offsetof(pppos_pcb, last_xmit));
364 pppos->in_accm[15] = 0x60;
365 pppos->out_accm[15] = 0x60;
368 PPPOS_UNPROTECT(lev);
373 PPPDEBUG(
LOG_INFO, (
"pppos_listen: unit %d: listening\n", ppp->netif->num));
379pppos_disconnect(ppp_pcb *ppp,
void *
ctx)
381 pppos_pcb *pppos = (pppos_pcb *)
ctx;
382 PPPOS_DECL_PROTECT(lev);
386 PPPOS_UNPROTECT(lev);
392#if !PPP_INPROC_IRQ_SAFE
394 pppos_input_free_current_packet(pppos);
401pppos_destroy(ppp_pcb *ppp,
void *
ctx)
403 pppos_pcb *pppos = (pppos_pcb *)
ctx;
406#if PPP_INPROC_IRQ_SAFE
408 pppos_input_free_current_packet(pppos);
415#if !NO_SYS && !PPP_INPROC_IRQ_SAFE
425pppos_input_tcpip(ppp_pcb *ppp,
const void *
s,
int l)
445 ppp_pcb *ppp = (ppp_pcb*)inp->
state;
449 for (
n =
p;
n;
n =
n->next) {
450 pppos_input(ppp,
n->payload,
n->len);
459#if PPP_INPROC_IRQ_SAFE
460#ifdef PACK_STRUCT_USE_INCLUDES
464struct pppos_input_header {
468#ifdef PACK_STRUCT_USE_INCLUDES
480pppos_input(ppp_pcb *ppp,
const void *
s,
int l)
482 pppos_pcb *pppos = (pppos_pcb *)ppp->link_ctx_cb;
483 struct pbuf *next_pbuf;
487 PPPOS_DECL_PROTECT(lev);
488#if !PPP_INPROC_IRQ_SAFE
497 PPPOS_UNPROTECT(lev);
500 PPPOS_UNPROTECT(lev);
502 PPPDEBUG(
LOG_DEBUG, (
"pppos_input[%d]: got %d bytes\n", ppp->netif->num,
l));
507 escaped = ESCAPE_P(pppos->in_accm, cur_char);
508 PPPOS_UNPROTECT(lev);
517 if (cur_char == PPP_ESCAPE) {
518 pppos->in_escaped = 1;
520 }
else if (cur_char == PPP_FLAG) {
522 if (pppos->in_state <= PDADDRESS) {
525 }
else if (pppos->in_state < PDDATA) {
527 (
"pppos_input[%d]: Dropping incomplete packet %d\n",
528 ppp->netif->num, pppos->in_state));
530 pppos_input_drop(pppos);
532 }
else if (pppos->in_fcs != PPP_GOODFCS) {
534 (
"pppos_input[%d]: Dropping bad fcs 0x%"X16_F" proto=0x%"X16_F"\n",
535 ppp->netif->num, pppos->in_fcs, pppos->in_protocol));
538 pppos_input_drop(pppos);
539 }
else if (!pppos->in_tail) {
541 (
"pppos_input[%d]: Dropping null in_tail\n",
544 pppos_input_drop(pppos);
549 if(pppos->in_tail->len > 2) {
550 pppos->in_tail->len -= 2;
552 pppos->in_tail->tot_len = pppos->in_tail->len;
553 if (pppos->in_tail != pppos->in_head) {
554 pbuf_cat(pppos->in_head, pppos->in_tail);
557 pppos->in_tail->tot_len = pppos->in_tail->len;
558 if (pppos->in_tail != pppos->in_head) {
559 pbuf_cat(pppos->in_head, pppos->in_tail);
562 pbuf_realloc(pppos->in_head, pppos->in_head->tot_len - 2);
566 inp = pppos->in_head;
568 pppos->in_head =
NULL;
569 pppos->in_tail =
NULL;
570#if IP_FORWARD || LWIP_IPV6_FORWARD
574 || pppos->in_protocol == PPP_IP
577 || pppos->in_protocol == PPP_IPV6
583#if PPP_INPROC_IRQ_SAFE
585 PPPDEBUG(
LOG_ERR, (
"pppos_input[%d]: tcpip_callback() failed, dropping packet\n", ppp->netif->num));
604 pppos->in_fcs = PPP_INITFCS;
605 pppos->in_state = PDADDRESS;
606 pppos->in_escaped = 0;
611 (
"pppos_input[%d]: Dropping ACCM char <%d>\n", ppp->netif->num, cur_char));
616 if (pppos->in_escaped) {
617 pppos->in_escaped = 0;
618 cur_char ^= PPP_TRANS;
622 switch (pppos->in_state) {
626 if (cur_char == PPP_ALLSTATIONS) {
627 pppos->in_state = PDCONTROL;
634 if (cur_char == PPP_UI) {
635 pppos->in_state = PDPROTOCOL1;
643 pppos->in_protocol = cur_char;
644 pppos->in_state = PDDATA;
646 pppos->in_protocol = (
u16_t)cur_char << 8;
647 pppos->in_state = PDPROTOCOL2;
651 pppos->in_protocol |= cur_char;
652 pppos->in_state = PDDATA;
657 u16_t pbuf_alloc_len;
658 if (pppos->in_tail !=
NULL) {
660 pppos->in_tail->tot_len = pppos->in_tail->len;
661 if (pppos->in_tail != pppos->in_head) {
662 pbuf_cat(pppos->in_head, pppos->in_tail);
664 pppos->in_tail =
NULL;
673#if IP_FORWARD || LWIP_IPV6_FORWARD
676#if PPP_INPROC_IRQ_SAFE
677 +
sizeof(
struct pppos_input_header)
679 +
sizeof(pppos->in_protocol);
680 if (pppos->in_head->tot_len > mru) {
684 PPPDEBUG(
LOG_ERR, (
"pppos_input[%d]: packet too big, max_len=%d, dropping packet\n", ppp->netif->num, mru));
686 pppos_input_drop(pppos);
687 pppos->in_state = PDIDLE;
693#if IP_FORWARD || LWIP_IPV6_FORWARD
698 if (pppos->in_head ==
NULL && (0
700 || pppos->in_protocol == PPP_IP
703 || pppos->in_protocol == PPP_IPV6
710 if (next_pbuf ==
NULL) {
714 PPPDEBUG(
LOG_ERR, (
"pppos_input[%d]: NO FREE PBUFS!\n", ppp->netif->num));
716 pppos_input_drop(pppos);
717 pppos->in_state = PDIDLE;
720 if (pppos->in_head ==
NULL) {
721 u8_t *payload = ((
u8_t*)next_pbuf->payload) + pbuf_alloc_len;
722#if PPP_INPROC_IRQ_SAFE
723 ((
struct pppos_input_header*)payload)->ppp = ppp;
724 payload +=
sizeof(
struct pppos_input_header);
725 next_pbuf->len +=
sizeof(
struct pppos_input_header);
727 next_pbuf->len +=
sizeof(pppos->in_protocol);
728 *(payload++) = pppos->in_protocol >> 8;
729 *(payload) = pppos->in_protocol & 0xFF;
730 pppos->in_head = next_pbuf;
732 pppos->in_tail = next_pbuf;
735 ((
u8_t*)pppos->in_tail->payload)[pppos->in_tail->len++] = cur_char;
742 pppos->in_fcs = PPP_FCS(pppos->in_fcs, cur_char);
747#if PPP_INPROC_IRQ_SAFE
750static void pppos_input_callback(
void *
arg) {
755 ppp = ((
struct pppos_input_header*)pb->
payload)->ppp;
766 pppos = (pppos_pcb *)ppp->link_ctx_cb;
783pppos_send_config(ppp_pcb *ppp,
void *
ctx,
u32_t accm,
int pcomp,
int accomp)
786 pppos_pcb *pppos = (pppos_pcb *)
ctx;
789 pppos->pcomp = pcomp;
790 pppos->accomp = accomp;
793 for (
i = 0;
i < 32/8;
i++) {
794 pppos->out_accm[
i] = (
u8_t)((accm >> (8 *
i)) & 0xFF);
797 PPPDEBUG(
LOG_INFO, (
"pppos_send_config[%d]: out_accm=%X %X %X %X\n",
798 pppos->ppp->netif->num,
799 pppos->out_accm[0], pppos->out_accm[1], pppos->out_accm[2], pppos->out_accm[3]));
803pppos_recv_config(ppp_pcb *ppp,
void *
ctx,
u32_t accm,
int pcomp,
int accomp)
806 pppos_pcb *pppos = (pppos_pcb *)
ctx;
807 PPPOS_DECL_PROTECT(lev);
814 for (
i = 0;
i < 32 / 8;
i++) {
815 pppos->in_accm[
i] = (
u8_t)(accm >> (
i * 8));
817 PPPOS_UNPROTECT(lev);
819 PPPDEBUG(
LOG_INFO, (
"pppos_recv_config[%d]: in_accm=%X %X %X %X\n",
820 pppos->ppp->netif->num,
821 pppos->in_accm[0], pppos->in_accm[1], pppos->in_accm[2], pppos->in_accm[3]));
828pppos_input_free_current_packet(pppos_pcb *pppos)
830 if (pppos->in_head !=
NULL) {
831 if (pppos->in_tail && (pppos->in_tail != pppos->in_head)) {
835 pppos->in_head =
NULL;
837 pppos->in_tail =
NULL;
844pppos_input_drop(pppos_pcb *pppos)
846 if (pppos->in_head !=
NULL) {
848 PPPDEBUG(
LOG_INFO, (
"pppos_input_drop: %d:%.*H\n", pppos->in_head->len,
min(60, pppos->in_head->len * 2), pppos->in_head->payload));
850 PPPDEBUG(
LOG_INFO, (
"pppos_input_drop: pbuf len=%d, addr %p\n", pppos->in_head->len, (
void*)pppos->in_head));
852 pppos_input_free_current_packet(pppos);
854 vj_uncompress_err(&pppos->ppp->vj_comp);
878 u32_t l = pppos->output_cb(pppos->ppp, nb->
payload, nb->
len, pppos->ppp->ctx_cb);
887 *fcs = PPP_FCS(*fcs,
c);
891 if (accm && ESCAPE_P(pppos->out_accm,
c)) {
904 ppp_pcb *ppp = pppos->ppp;
907 err = pppos_output_append(pppos,
err, nb, ~(*fcs) & 0xFF, 1,
NULL);
908 err = pppos_output_append(pppos,
err, nb, (~(*fcs) >> 8) & 0xFF, 1,
NULL);
909 err = pppos_output_append(pppos,
err, nb, PPP_FLAG, 0,
NULL);
932 pppos->last_xmit = 0;
while(CdLookupNextInitialFileDirent(IrpContext, Fcb, FileContext))
#define PACK_STRUCT_STRUCT
#define LWIP_ASSERT(message, assertion)
#define MIB2_STATS_NETIF_ADD(n, x, val)
#define MIB2_STATS_NETIF_INC(n, x)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define LWIP_UNUSED_ARG(x)
#define PACK_STRUCT_BEGIN
#define PACK_STRUCT_FIELD(x)
#define LWIP_ASSERT_CORE_LOCKED()
#define PBUF_LINK_ENCAPSULATION_HLEN
#define PBUF_POOL_BUFSIZE
err_t tcpip_try_callback(tcpip_callback_fn function, void *ctx)
#define LWIP_MEMPOOL_DECLARE(name, num, size, desc)
#define LWIP_MEMPOOL_ALLOC(name)
#define LWIP_MEMPOOL_FREE(name, x)
void pbuf_realloc(struct pbuf *p, u16_t new_len)
void pbuf_cat(struct pbuf *h, struct pbuf *t)
struct pbuf * pbuf_alloc(pbuf_layer layer, u16_t length, pbuf_type type)
u8_t pbuf_free(struct pbuf *p)
err_t pbuf_take(struct pbuf *buf, const void *dataptr, u16_t len)
u8_t pbuf_remove_header(struct pbuf *p, size_t header_size_decrement)
#define offsetof(TYPE, MEMBER)
#define LINK_STATS_INC(x)
err_t tcpip_inpkt(struct pbuf *p, struct netif *inp, netif_input_fn input_fn)
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList