HP X.25/9000 Programmer's Guide
Chapter 4 61
Sending and Receiving Data
Getting Next Message Status
Getting Next Message Status
You can use the ioctl(X25_NEXT_MSG_STAT) system call to obtain
information about the next available message.
ioctl(X25_NEXT_MSG_STAT) is almost always used when the
ioctl(X25_SET_FRAGMENT_SIZE) is used.
The ioctl(X25_NEXT_MSG_STAT) Call
ioctl(X25_NEXT_MSG_STAT) returns the following information:
• Size of the next message or next message fragment
• Status of the M, D or Q bits on the next message
• If call user data is available on the next message
• If clear data is available on the next message
• If a connection is established on the VC
Syntax for ioctl(X25_NEXT_MSG_STAT)
The syntax for the ioctl(X25_NEXT_MSG_STAT) system call and its
parameters are described below.
#include <x25/x25ioctls.h>
#include <x25/x25str.h>
/* struct x25_msg_stat {
* int x25_msg_size
* int x25_msg_flags;
* } x25_msg_stat;
*/
int err;
int sd;
struct x25_msg_stat status;
err = ioctl(sd, X25_NEXT_MSG_STAT, &status);
sd Socket descriptor for a VC socket.
X25_NEXT_MSG
_STAT
Indicates that the status of the socket is being obtained.
36960-90061.bk Page 61 Friday, November 10, 2000 3:42 PM










