For keeping information in messages you have just a few alternatives.
- Set the db_type field to a value of your own. Just be sure not to send such messages to other drivers; they likely won't understand your message types.
- Put a header in front of the data. You can make it visible or invisible as you prefer. You can put it just in front of visible data, just after, at the front of the buffer, at the end, wherever you like. When the buffer is sent to another module the extra information is presumed lost.
At 02:20 PM 1/16/2003 Thursday, Vinay Channagiri wrote:
Hello Dave,
Here's the msgb structure. The b_flag is quoted as "PRIVATE". Does that mean "The flags defined in b_flag is meant for only STREAMS framework"??? If that is the case, where should STREAMS modules/drivers need to introduce a new flag if required ???
Please respond to me at the earliest. Thanks
/*********************** Excerpts MSG.H ***********************/
typedef
struct msgb {
SHARE
struct msgb *b_next; /* next msg on queue */
struct msgb *b_prev; /* prev msg on queue */
struct msgb *b_cont; /* next blk of msg */
unsigned char *b_rptr; /* 1st unread byte */
unsigned char *b_wptr; /* 1st unwriten byte */
EXPORT
struct datab *b_datap; /* pointer to data */
unsigned charb_band; /* message priority */
unsigned charb_pad1;
PRIVATE
unsigned short b_flag; /* see below */
longb_pad2;
} msgb_t;
/*********************** Excerpts MSG.H ***********************/
Regards,
VINAY
---------------------------
_____________________________________________________________
Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus
