add .gitignore
[remotetop.git] / top.h
diff --git a/top.h b/top.h
index ca89a59..8fb1dd3 100644 (file)
--- a/top.h
+++ b/top.h
 #define TOPGETTYPE                     0x06ED10AD
 
 typedef struct {
-        double  load;
-        int     freemem;
-        int     usermem;
+        double         load;
+        int64_t     freemem;
+        int64_t     physmem;
 } TCMsgTop;
 
 typedef struct {
         TCMsgTop        top;
         time_t          stamp;
         struct in_addr  ip;
-        u_int32_t       flag;
 } UnitInfo;
 
 typedef struct {
@@ -56,7 +55,7 @@ typedef struct {
         UnitInfo   units[1];
 } MassiveUnit;
 
-#define MUHDRSZ         (2*sizeof(u_int32_t))
+#define MUHDRSZ         offsetof( MassiveUnit, units )
 
 MassiveUnit *allocUnits(int n);
 void fillUnit( MassiveUnit* mu, UnitInfo *unit );