common/argus_util.c fails to build in RC24
carter at qosient.com
carter at qosient.com
Tue Aug 8 20:21:19 EDT 2006
Gentle people,
The version on the server was not really an announced version, so my mistake. I'll try to have a fix up tonight. Argus and the clients are not symmerical with regard to definitions, as they have different design considerations. Peter is right that they were separate for convenience, but it became important from a performance perspective. For example, argus should not have a need for 64-bit counters, but the clients absolutely do, and argus will never generate an aggregate data element, but all aggregators will.
Carter
Carter Bullard
QoSient LLC
150 E. 57th Street Suite 12D
New York, New York 10022
+1 212 588-9133 Phone
+1 212 588-9134 Fax
-----Original Message-----
From: Peter Van Epp <vanepp at sfu.ca>
Date: Tue, 8 Aug 2006 08:17:10
To:Christoph Badura <bad at bsd.de>
Cc:argus-info at lists.andrew.cmu.edu
Subject: Re: [ARGUS] common/argus_util.c fails to build in RC24
On Tue, Aug 08, 2006 at 11:58:31AM +0200, Christoph Badura wrote:
> Compiling RC24 of both argus and argus-clients fails in common/argus_util.c.
>
> I'm surprised that it fails because different structure members are missing.
> Is the code in the common subdirectory not common between the server and
> the clients?
>
While you want to wait for the official fix from Carter (because I'm
not sure this is entirely correct and what he meant) this patch should fix
this (and another one in user data display) far enough for it to compile and
run. The server code has been separated from the client code to allow different
update cycles so they aren't necessarily identical.
Peter Van Epp / Operations and Technical Support
Simon Fraser University, Burnaby, B.C. Canada
*** common/argus_util.c.orig Fri Aug 4 11:19:15 2006
--- common/argus_util.c Fri Aug 4 12:05:41 2006
***************
*** 11243,11250 ****
rtcpObj->dst.rh_len = ntohs(rtcpObj->dst.rh_len);
rtcpObj->dst.rh_ssrc = ntohl(rtcpObj->dst.rh_ssrc);
! rtcpObj->src_pkt_drop = ntohs(rtcpObj->src_pkt_drop);
! rtcpObj->dst_pkt_drop = ntohs(rtcpObj->dst_pkt_drop);
break;
}
}
--- 11243,11250 ----
rtcpObj->dst.rh_len = ntohs(rtcpObj->dst.rh_len);
rtcpObj->dst.rh_ssrc = ntohl(rtcpObj->dst.rh_ssrc);
! rtcpObj->sdrop = ntohs(rtcpObj->sdrop);
! rtcpObj->ddrop = ntohs(rtcpObj->ddrop);
break;
}
}
***************
*** 11658,11665 ****
rtcpObj->dst.rh_len = htons(rtcpObj->dst.rh_len);
rtcpObj->dst.rh_ssrc = htonl(rtcpObj->dst.rh_ssrc);
! rtcpObj->src_pkt_drop = htons(rtcpObj->src_pkt_drop);
! rtcpObj->dst_pkt_drop = htons(rtcpObj->dst_pkt_drop);
break;
}
}
--- 11658,11665 ----
rtcpObj->dst.rh_len = htons(rtcpObj->dst.rh_len);
rtcpObj->dst.rh_ssrc = htonl(rtcpObj->dst.rh_ssrc);
! rtcpObj->sdrop = htons(rtcpObj->sdrop);
! rtcpObj->ddrop = htons(rtcpObj->ddrop);
break;
}
}
***************
*** 13494,13504 ****
case ARGUS_V2_DSTUSRDATA_DSR_STATUS: {
struct ArgusDataStruct *user = (struct ArgusDataStruct *)dsr;
struct ArgusV2UserStruct *nv2user = (struct ArgusV2UserStruct *)hdrs[ARGUS_V2_DSTUSRDATA_DSR_INDEX];
user->hdr.type = ARGUS_DATA_DSR;
user->hdr.subtype = ARGUS_LEN_16BITS | ARGUS_DST_DATA;
user->hdr.argus_dsrvl16.len = nv2user->length + 1;
! user->size = nv2user->length * 4;
! user->count = user->size;
bcopy (&nv2user->data, &user->array, (nv2user->length - 1) * 4);
dsr += user->hdr.argus_dsrvl16.len;
--- 13494,13506 ----
case ARGUS_V2_DSTUSRDATA_DSR_STATUS: {
struct ArgusDataStruct *user = (struct ArgusDataStruct *)dsr;
struct ArgusV2UserStruct *nv2user = (struct ArgusV2UserStruct *)hdrs[ARGUS_V2_DSTUSRDATA_DSR_INDEX];
+ int len = (nv2user->length - 1) * 4;
+ len = (len < argus2->argus_far.dst.appbytes) ? len : argus2->argus_far.dst.appbytes;
user->hdr.type = ARGUS_DATA_DSR;
user->hdr.subtype = ARGUS_LEN_16BITS | ARGUS_DST_DATA;
user->hdr.argus_dsrvl16.len = nv2user->length + 1;
! user->size = (nv2user->length - 1) * 4;
! user->count = len;
bcopy (&nv2user->data, &user->array, (nv2user->length - 1) * 4);
dsr += user->hdr.argus_dsrvl16.len;
More information about the argus
mailing list