*/
/*
- * This version is used under SunOS 4.x, DEC Alpha OSF/1, AIX 4.x,
+ * This version is used under SunOS 4.x, Digital UNIX, AIX 4.x,
* and SVR4 systems including Solaris 2.
*
- * $Id: vjcompress.c,v 1.8 1996/05/24 07:04:26 paulus Exp $
+ * $Id: vjcompress.c,v 1.11 2004/01/17 05:47:55 carlsonj Exp $
*/
#include <sys/types.h>
#endif
#endif
-#ifdef OSF1
+#ifdef __osf__
#include <net/net_globals.h>
#endif
#include <netinet/in.h>
#include <netinet/in_systm.h>
#endif
+#ifdef SOL2
+#include <sys/sunddi.h>
+#endif
+
#include <netinet/ip.h>
#include <netinet/tcp.h>
#define ovbcopy bcopy
#endif
-#ifdef OSF1
+#ifdef __osf__
#define getip_hl(base) (((base).ip_vhl)&0xf)
#define getth_off(base) ((((base).th_xoff)&0xf0)>>4)
* with it. */
goto uncompressed;
- if (deltaS = (u_short)(ntohs(th->th_win) - ntohs(oth->th_win))) {
+ if ((deltaS = (u_short)(ntohs(th->th_win) - ntohs(oth->th_win))) > 0) {
ENCODE(deltaS);
changes |= NEW_W;
}
- if (deltaA = ntohl(th->th_ack) - ntohl(oth->th_ack)) {
+ if ((deltaA = ntohl(th->th_ack) - ntohl(oth->th_ack)) > 0) {
if (deltaA > 0xffff)
goto uncompressed;
ENCODE(deltaA);
changes |= NEW_A;
}
- if (deltaS = ntohl(th->th_seq) - ntohl(oth->th_seq)) {
+ if ((deltaS = ntohl(th->th_seq) - ntohl(oth->th_seq)) > 0) {
if (deltaS > 0xffff)
goto uncompressed;
ENCODE(deltaS);