18 * information: Portions Copyright [yyyy] [name of copyright owner] |
18 * information: Portions Copyright [yyyy] [name of copyright owner] |
19 * |
19 * |
20 * CDDL HEADER END |
20 * CDDL HEADER END |
21 */ |
21 */ |
22 /* |
22 /* |
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved. |
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved. |
24 * Use is subject to license terms. |
24 * Use is subject to license terms. |
25 */ |
25 */ |
26 |
26 |
27 #ifndef _SYS_MULTIDATA_H |
27 #ifndef _SYS_MULTIDATA_H |
28 #define _SYS_MULTIDATA_H |
28 #define _SYS_MULTIDATA_H |
66 } mbufinfo_t; |
66 } mbufinfo_t; |
67 |
67 |
68 /* |
68 /* |
69 * Multidata packet descriptor information. |
69 * Multidata packet descriptor information. |
70 */ |
70 */ |
71 typedef struct pdescinfo_s { |
71 struct pld_ary_s { |
72 uint_t flags; /* misc. flags */ |
72 int pld_pbuf_idx; /* payload buffer index */ |
73 uchar_t *hdr_base; /* start address of header area */ |
73 uchar_t *pld_rptr; /* start address of payload data */ |
74 uchar_t *hdr_rptr; /* start address of header data */ |
74 uchar_t *pld_wptr; /* pointer to end of payload data */ |
75 uchar_t *hdr_wptr; /* end address of header data */ |
75 }; |
76 uchar_t *hdr_lim; /* end address of header area */ |
76 |
77 uint_t pld_cnt; /* number of payload area */ |
77 #define PDESCINFO_STRUCT(elems) \ |
78 struct pld_ary_s { |
78 { \ |
79 int pld_pbuf_idx; /* payload buffer index */ |
79 uint_t flags; /* misc. flags */ \ |
80 uchar_t *pld_rptr; /* start address of payload data */ |
80 uchar_t *hdr_base; /* start address of header area */ \ |
81 uchar_t *pld_wptr; /* pointer to end of payload data */ |
81 uchar_t *hdr_rptr; /* start address of header data */ \ |
82 } pld_ary[MULTIDATA_MAX_PBUFS]; |
82 uchar_t *hdr_wptr; /* end address of header data */ \ |
83 } pdescinfo_t; |
83 uchar_t *hdr_lim; /* end address of header area */ \ |
|
84 uint_t pld_cnt; /* number of payload area */ \ |
|
85 struct pld_ary_s pld_ary[(elems)]; \ |
|
86 } |
|
87 |
|
88 typedef struct pdescinfo_s PDESCINFO_STRUCT(MULTIDATA_MAX_PBUFS) pdescinfo_t; |
84 |
89 |
85 /* |
90 /* |
86 * Possible values for flags |
91 * Possible values for flags |
87 */ |
92 */ |
88 #define PDESC_HBUF_REF 0x1 /* descriptor uses header buffer */ |
93 #define PDESC_HBUF_REF 0x1 /* descriptor uses header buffer */ |