Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

msgsize(9f) [opensolaris man page]

msgsize(9F)						   Kernel Functions for Drivers 					       msgsize(9F)

NAME
msgsize - Return the total number of bytes in a message SYNOPSIS
#include <sys/stream.h> #include <sys/strsun.h> size_t msgsize(mblk_t *mp); INTERFACE LEVEL
Solaris DDI specific (Solaris DDI) PARAMETERS
mp Message to be evaluated. DESCRIPTION
The msgsize() function counts the number of bytes in a message, regardless of the data type of the underlying data blocks. RETURN VALUES
Number of bytes in the message. CONTEXT
This function can be called from user, kernel or interrupt context. SEE ALSO
msgdsize(9F) STREAMS Programming Guide SunOS 5.11 9 June 2004 msgsize(9F)

Check Out this Related Man Page

mexchange(9F)						   Kernel Functions for Drivers 					     mexchange(9F)

NAME
mexchange - Exchange one message for another SYNOPSIS
#include <sys/stream.h> #include <sys/strsun.h> mblk_t *mexchange(queue_t *wq, mblk_t *mp, size_t size, uchar_t type, int32_t primtype); INTERFACE LEVEL
Solaris DDI specific (Solaris DDI). PARAMETERS
wq Optionally, write queue associated with the read queue to be used on failure (see below). mp Optionally, the message to exchange. size Size of the returned message. type Type of the returned message. primtype Optionally, a 4 byte value to store at the beginning of the returned message. DESCRIPTION
The mexchange() function exchanges the passed in message for another message of the specified size and type. If mp is not NULL, is of at least size bytes, and has only one reference (see dupmsg(9F)), mp is converted to be of the specified size and type. Otherwise, a new message of the specified size and type is allocated. If allocation fails, and wq is not NULL, merror(9F) attempts to send an error to the stream head. Finally, if primtype is not -1 and size is at least 4 bytes, the first 4 bytes are assigned to be primtype. This is chiefly useful for STREAMS-based protocols such as DLPI and TPI which store the protocol message type in the first 4 bytes of each message. RETURN VALUES
A pointer to the requested message is returned on success. NULL is returned on failure. CONTEXT
This function can be called from user, kernel or interrupt context. SEE ALSO
dupmsg(9F), merror(9F) STREAMS Programming Guide SunOS 5.10 9 June 2004 mexchange(9F)
Man Page

7 More Discussions You Might Find Interesting

1. Programming

Handle int listen(int sockfd, int backlog) in TCP

Hi, from the manual listen(2): listen for connections on socket - Linux man page It has a parameter called backlog and it limits the maximum length of queue of pending list. If I set backlog to 128, is it means no more than 128 packets can be handled by server? If I have three... (3 Replies)
Discussion started by: sehang
3 Replies

2. Programming

utime returning -1 BAD File DEscriptor

Hi All, First of all thanks for reading this post. In my application, I am trying to create a new message queue . I am attaching the code below. mqd_t mqopen2(const char * pName, unsigned long Flags, long maxMsg, long msgSz) {... (15 Replies)
Discussion started by: parusasi
15 Replies

3. Programming

How to use sigmask in order to make signals can be processed by a thread

Hi, I have a UDP server and client program, and they must run within a program, so I decided two threads, one for UDP server and another for UDP client. The simple architecture is shown in attachment. However, I can't send the packets out on the UDP client, no any time message and... (2 Replies)
Discussion started by: sehang
2 Replies

4. Programming

Program crashes on calling __libc_msgrcv()

Hi, I am a newbie to linux programming. I have implemented msgqueue in C. msgrcv() call at the client end is as below: msgrcv( msgqid, msgptr, msgsize, msgtype, 0 ); My program works fine when msgrcv () from /lib/libc.so.6 is called. However it crashes when __libc_msgrcv() is called. ... (3 Replies)
Discussion started by: praasanna
3 Replies

5. Programming

How to get the number of bytes parsed in libxml2

Hi, I am using the libxml2 sax parser to parse a in memory xml string along with validating it against a schema. I am using the following code: xmlSAXHandlerPtr sax_ = new xmlSAXHandler(); sax_->initialized = XML_SAX2_MAGIC; sax_->startElementNs =... (0 Replies)
Discussion started by: Sam Krishna
0 Replies

6. Programming

A weird problem with POSIX function

Hi all, Sorry for the title because I didn't find a proper name for it. My question is about POSIX functions, such as timer_create(), mq_open() and pthread_create(). void test_queue() { struct mq_attr attr; attr.mq_maxmsg = 10; attr.mq_msgsize = 64; mq_unlink("/my_test_queue");... (6 Replies)
Discussion started by: bus147
6 Replies

7. UNIX for Dummies Questions & Answers

How to search for a string with special chars?

Hi guys, I am trying to find the following string in a file, but I always get pattern not found error, not sure what is missing here. Can you help please? I do a less to open the xrates.log and then do a /'="18"' in the file and tried various combinations to search the below string. String... (8 Replies)
Discussion started by: santokal
8 Replies

Featured Tech Videos