> The problem is in his code. Specifically, when he calls getmsg(), he > fails to check the returned value for MORECTL and MOREDATA responses. > > When he sends DL_INFO_REQ, he's not allocating a buffer large enough > to hold the DL_INFO_ACK response. This leaves some of the (M_PCPROTO) > data sitting at the stream head. When he next goes to poll, he sees > the left-over (unread) data from that attempt, and that causes the > confusion. > > The fix is to bump up the size of dlbuf so that it's adequate to hold > the expected responses, and/or check for MORECTL and MOREDATA when > using getmsg().
Indeed. On a related note, as part of Clearview, we're adding a documented set of interfaces for doing DLPI operations that take care of all of this sort of fiddly and error-prone stuff automatically. We'll be sending out a revised specification in the next couple days, and we'd welcome input on the API from your developers, Eric. -- meem _______________________________________________ networking-discuss mailing list [email protected]
