Window size is set in the Call Request packet as follows:
u_short sendwndsize, recvwndsize; /* set sendwndsize, recvwndsize to desired values */ f.type = T_WINDOW_SIZE; f.f_sendwndsize = sendwndsize; f.f_recvwndsize = recvwndsize; error = ioctl(s, X25_SET_FACILITY, &f);
It is read as follows:
f.type = T_WINDOW_SIZE; error = ioctl(s, X25_GET_FACILITY, &f); sendwndsize = f.f_sendwndsize; recvwndsize = f.f_recvwndsize;
Setting the window size in the Call Request causes the values set to be proposed for the call (a zero value indicates the default for the link). Reading the value after the call is set up yields the result of negotiation.