Dave,

I have seen the MSG_DELIM flag used in a chain of M_DATA blocks to
deliminate packets.  Although this might be a rather common use
of the MSG_DELIM flag, the user does set it.  Perhaps SHARE is more
appropriate than PRIVATE, but, after all, it is just a designation
and not enforced by the code.

--brian


On Thu, 16 Jan 2003, Dave Grothe wrote:

> 
>    The  mblk_t  structure  was never designed for users to keep their own
>    information  in.   Queue_t  structures have a "q_ptr" that is designed
>    for  the  user  (driver) to use to point to some sort of control block
>    structure that belongs to the driver.
>    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.
> 
>    -- Dave
>    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 char   b_band;  /* message priority */
>              unsigned char   b_pad1;
>        PRIVATE
>              unsigned short  b_flag;  /* see below */
>              long            b_pad2;
>      } msgb_t;
>      /*********************** Excerpts MSG.H ***********************/
>      Regards,
>      VINAY
>      ---------------------------
>      _____________________________________________________________
>      Get   25MB,   POP3,   Spam  Filtering  with  LYCOS  MAIL  PLUS  for
>      $19.95/year.
>      [1]http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtp
>      lus
> 
> References
> 
>    1. http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus

-- 
Brian F. G. Bidulock    � The reasonable man adapts himself to the �
[EMAIL PROTECTED]    � world; the unreasonable one persists in  �
http://www.openss7.org/ � trying  to adapt the  world  to himself. �
                        � Therefore  all  progress  depends on the �
                        � unreasonable man. -- George Bernard Shaw �

_______________________________________________
Linux-streams mailing list
[EMAIL PROTECTED]
http://gsyc.escet.urjc.es/mailman/listinfo/linux-streams

Reply via email to