HP rp2450 HP DLPI Programmer's Guide - Page 192
put_data putmsg failed, errno = %d\n, errno, ifputmsgfd
View all HP rp2450 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 192 highlights
Sample Programs Connection Mode Example } } } printf("error: exit(1); } check_ctrl found no message\n"); put a message consisting of only a data part on a stream void put_data(fd, length) intfd;/* file descriptor */ intlength;/* length of data message */ { /* set the len field in the strbuf structure */ data_buf.len = length; /* call putmsg and check for an error */ if(putmsg(fd, 0, &data_buf, 0) < 0) { printf("error: put_data putmsg failed, errno = %d\n", errno); exit(1); } } put a message consisting of only a control part on a stream void put_ctrl(fd, length, pri) intfd;/* file descriptor */ intlength;/* length of control message */ intpri;/* priority of message: either 0 or RS_HIPRI */ { /* set the len field in the strbuf structure */ ctrl_buf.len = length; /* call putmsg and check for an error */ if(putmsg(fd, &ctrl_buf, 0, pri) < 0) { printf("error: put_ctrl putmsg failed, errno = %d\n", errno); exit(1); } } 192 Appendix A