The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

MBLKHEAD (9)
  • >> MBLKHEAD (9) ( Solaris man: Ядро )
  •  

    NAME

    MBLKHEAD, MBLKIN, MBLKL, MBLKSIZE, MBLKTAIL - Message block utility macros
     
    

    SYNOPSIS

    #include <sys/stream.h>
    #include <sys/strsun.h>
    

    int MBLKHEAD(mblk_t *mp);

    int MBLKTAIL(mblk_t *mp);

    int MBLKSIZE(mblk_t *mp);

    int MBLKL(mblk_t *mp);

    int MBLKIN(mblk_t *mp, int offset, int len);  

    INTERFACE LEVEL

    Solaris DDI specific (Solaris DDI).  

    PARAMETERS

    mp Message to be examined.

    offset Offset from mp->b_rptr from which to start examining.

    len Number of bytes to examine.

     

    DESCRIPTION

    The MBLKHEAD() macro calculates the number of bytes between the first byte and the first unread byte of the message block, that is: mp->b_rptr - mp->b_datap->db_base.

    The MBLKTAIL() macro calculates the number of bytes between the first unwritten byte and the last byte of the message block, that is: mp->b_datap->db_lim - mp->b_wptr.

    The MBLKSIZE() macros calculates the total size of the message block, that is: mp->b_datap->db_lim - mp->b_datap->db_base.

    The MBLKL() macro calculates the length of the message block, that is: mp->b_wptr - mp->b_rptr.

    The MBLKIN() macro checks whether the byte range specified by offset and len resides entirely within the message block.  

    RETURN VALUES

    The MBLKHEAD(), MBLKTAIL(), MBLKL() and MBLKSIZE() functions all return the appropriate byte count, as specified above. MBLKIN() returns non-zero if the check succeeds, or zero if it fails.  

    CONTEXT

    These functions can be called from user, kernel or interrupt context.  

    NOTES

    These macros may evaluate any of their arguments more than once. This precludes passing arguments with side effects.

    These macros assume the message itself is well formed, that is: mp->b_datap->db_base <= mp->b_rptr <= mp->b_wptr <= mp->b_datap->db_lim.  

    SEE ALSO

    msgb(9S)

    STREAMS Programming Guide


     

    Index

    NAME
    SYNOPSIS
    INTERFACE LEVEL
    PARAMETERS
    DESCRIPTION
    RETURN VALUES
    CONTEXT
    NOTES
    SEE ALSO


    Поиск по тексту MAN-ов: 




    Партнёры:
    PostgresPro
    Inferno Solutions
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2024 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру