kumquat-buildroot/package/argus/argus-3.0.0.rc.34-00-susv3-legacy.patch

1279 lines
62 KiB
Diff
Raw Normal View History

2006-12-20 17:38:22 +01:00
diff -rup argus-3.0.0.rc.34.orig/argus/ArgusApp.c argus-3.0.0.rc.34/argus/ArgusApp.c
--- argus-3.0.0.rc.34.orig/argus/ArgusApp.c 2006-08-18 19:15:14.000000000 +0200
+++ argus-3.0.0.rc.34/argus/ArgusApp.c 2006-12-20 16:21:04.000000000 +0100
@@ -196,9 +196,9 @@ ArgusUpdateAppState (struct ArgusModeler
net->hdr.argus_dsrvl8.qual = 0;
net->hdr.argus_dsrvl8.len = ((sizeof(struct ArgusRTCPObject) + 3)/4) + 1;
if (model->ArgusThisDir) {
- bcopy ((char *) rtcp, (char *)&rtcpObject->src, sizeof(*rtcp));
+ memmove ((char *)&rtcpObject->src, (char *) rtcp, sizeof(*rtcp));
} else {
- bcopy ((char *) rtcp, (char *)&rtcpObject->dst, sizeof(*rtcp));
+ memmove ((char *)&rtcpObject->dst, (char *) rtcp, sizeof(*rtcp));
}
} else {
@@ -215,9 +215,9 @@ ArgusUpdateAppState (struct ArgusModeler
rtp->rh_ssrc = ntohl(rtp->rh_ssrc);
if (model->ArgusThisDir) {
- bcopy ((char *) rtp, (char *)&rtpObject->src, sizeof(*rtp));
+ memmove ((char *)&rtpObject->src, (char *) rtp, sizeof(*rtp));
} else {
- bcopy ((char *) rtp, (char *)&rtpObject->dst, sizeof(*rtp));
+ memmove ((char *)&rtpObject->dst, (char *) rtp, sizeof(*rtp));
}
}
}
@@ -301,7 +301,7 @@ ArgusUpdateAppState (struct ArgusModeler
if ((bytes = model->ArgusThisSnapEnd - model->ArgusThisUpHdr) > 0) {
thislen = (thislen > bytes) ? bytes : thislen;
- bcopy (model->ArgusThisUpHdr, &((char *)&user->array)[user->count], thislen);
+ memmove (&((char *)&user->array)[user->count], model->ArgusThisUpHdr, thislen);
user->count += thislen;
}
}
@@ -358,7 +358,7 @@ ArgusUpdateRTPState (struct ArgusModeler
ArgusThisRtpHdr = &rtpObject->dst;
if (!(ArgusThisRtpHdr->rh_seq)) {
- bcopy ((char *) rtp, (char *)ArgusThisRtpHdr, sizeof(*rtp));
+ memmove ((char *)ArgusThisRtpHdr, (char *) rtp, sizeof(*rtp));
} else {
if (!(rtp->rh_ssrc) || (ArgusThisRtpHdr->rh_ssrc != rtp->rh_ssrc))
flowstr->dsrs[ARGUS_NETWORK_INDEX] = NULL;
@@ -404,7 +404,7 @@ ArgusUpdateRTPState (struct ArgusModeler
}
}
- bcopy ((char *) rtp, (char *) ArgusThisRtpHdr, sizeof(*rtp));
+ memmove ((char *) ArgusThisRtpHdr, (char *) rtp, sizeof(*rtp));
model->ArgusThisUpHdr = (unsigned char *)(rtp + 1) + offset;
model->ArgusThisLength -= (sizeof(struct rtphdr) + offset);
diff -rup argus-3.0.0.rc.34.orig/argus/ArgusArp.c argus-3.0.0.rc.34/argus/ArgusArp.c
--- argus-3.0.0.rc.34.orig/argus/ArgusArp.c 2006-08-18 19:15:14.000000000 +0200
+++ argus-3.0.0.rc.34/argus/ArgusArp.c 2006-12-20 16:12:05.000000000 +0100
@@ -81,8 +81,8 @@ ArgusCreateArpFlow (struct ArgusModelerS
case ARPOP_REQUEST:
retn->hdr.argus_dsrvl8.qual = ARGUS_TYPE_ARP;
srcehost = (unsigned char *) &model->ArgusThisEpHdr->ether_shost;
- bcopy ((char *)&arp->arp_tpa, &arp_tpa, sizeof(arp_tpa));
- bcopy ((char *)&arp->arp_spa, &arp_spa, sizeof(arp_spa));
+ memmove (&arp_tpa, (char *)&arp->arp_tpa, sizeof(arp_tpa));
+ memmove (&arp_spa, (char *)&arp->arp_spa, sizeof(arp_spa));
#ifdef _LITTLE_ENDIAN
arp_spa = ntohl(arp_spa);
arp_tpa = ntohl(arp_tpa);
@@ -90,7 +90,7 @@ ArgusCreateArpFlow (struct ArgusModelerS
if (arp_spa > arp_tpa)
model->state |= ARGUS_DIRECTION;
- bcopy (srcehost, retn->arp_flow.etheraddr, sizeof (retn->arp_flow.etheraddr));
+ memmove (retn->arp_flow.etheraddr, srcehost, sizeof (retn->arp_flow.etheraddr));
retn->arp_flow.arp_tpa = arp_tpa;
retn->arp_flow.arp_spa = arp_spa;
@@ -101,8 +101,8 @@ ArgusCreateArpFlow (struct ArgusModelerS
retn->hdr.argus_dsrvl8.qual = ARGUS_TYPE_ARP;
srcehost = (unsigned char *) &model->ArgusThisEpHdr->ether_dhost;
- bcopy ((char *)&arp->arp_spa, &arp_spa, sizeof(arp_tpa));
- bcopy ((char *)&arp->arp_tpa, &arp_tpa, sizeof(arp_spa));
+ memmove (&arp_spa, (char *)&arp->arp_spa, sizeof(arp_tpa));
+ memmove (&arp_tpa, (char *)&arp->arp_tpa, sizeof(arp_spa));
#ifdef _LITTLE_ENDIAN
arp_spa = ntohl(arp_spa);
arp_tpa = ntohl(arp_tpa);
@@ -111,7 +111,7 @@ ArgusCreateArpFlow (struct ArgusModelerS
if (arp_tpa > arp_spa)
model->state |= ARGUS_DIRECTION;
- bcopy (srcehost, retn->arp_flow.etheraddr, sizeof (retn->arp_flow.etheraddr));
+ memmove (retn->arp_flow.etheraddr, srcehost, sizeof (retn->arp_flow.etheraddr));
retn->arp_flow.arp_tpa = arp_tpa;
retn->arp_flow.arp_spa = arp_spa;
@@ -120,29 +120,29 @@ ArgusCreateArpFlow (struct ArgusModelerS
case REVARP_REQUEST:
retn->hdr.argus_dsrvl8.qual = ARGUS_TYPE_RARP;
- bcopy ((char *)&arp->arp_tpa, &arp_tpa, sizeof(arp_tpa));
+ memmove (&arp_tpa, (char *)&arp->arp_tpa, sizeof(arp_tpa));
#ifdef _LITTLE_ENDIAN
arp_tpa = ntohl(arp_tpa);
#endif
srcehost = (unsigned char *)&THA(arp);
tarehost = (unsigned char *)&SHA(arp);
- bcopy ((char *)&arp->arp_tpa, &retn->rarp_flow.arp_tpa, sizeof(arp_tpa));
- bcopy (srcehost, retn->rarp_flow.srceaddr, sizeof (retn->rarp_flow.srceaddr));
- bcopy (tarehost, retn->rarp_flow.tareaddr, sizeof (retn->rarp_flow.tareaddr));
+ memmove (&retn->rarp_flow.arp_tpa, (char *)&arp->arp_tpa, sizeof(arp_tpa));
+ memmove (retn->rarp_flow.srceaddr, srcehost, sizeof (retn->rarp_flow.srceaddr));
+ memmove (retn->rarp_flow.tareaddr, tarehost, sizeof (retn->rarp_flow.tareaddr));
break;
case REVARP_REPLY:
retn->hdr.argus_dsrvl8.qual = ARGUS_TYPE_RARP;
- bcopy ((char *)&arp->arp_tpa, &arp_tpa, sizeof(arp_tpa));
+ memmove (&arp_tpa, (char *)&arp->arp_tpa, sizeof(arp_tpa));
#ifdef _LITTLE_ENDIAN
arp_tpa = ntohl(arp_tpa);
#endif
srcehost = (unsigned char *)&SHA(arp);
tarehost = (unsigned char *)&THA(arp);
- bcopy ((char *)&arp->arp_tpa, &retn->rarp_flow.arp_tpa, sizeof(arp_tpa));
- bcopy (srcehost, retn->rarp_flow.srceaddr, sizeof (retn->rarp_flow.srceaddr));
- bcopy (tarehost, retn->rarp_flow.tareaddr, sizeof (retn->rarp_flow.tareaddr));
+ memmove (&retn->rarp_flow.arp_tpa, (char *)&arp->arp_tpa, sizeof(arp_tpa));
+ memmove (retn->rarp_flow.srceaddr, srcehost, sizeof (retn->rarp_flow.srceaddr));
+ memmove (retn->rarp_flow.tareaddr, tarehost, sizeof (retn->rarp_flow.tareaddr));
break;
}
}
@@ -177,7 +177,7 @@ ArgusUpdateArpState (struct ArgusModeler
break;
case ARPOP_REPLY:
- bcopy ((unsigned char *)&SHA(arp), arpobj->respaddr, 6);
+ memmove (arpobj->respaddr, (unsigned char *)&SHA(arp), 6);
break;
}
}
diff -rup argus-3.0.0.rc.34.orig/argus/ArgusEsp.c argus-3.0.0.rc.34/argus/ArgusEsp.c
--- argus-3.0.0.rc.34.orig/argus/ArgusEsp.c 2006-08-18 19:15:14.000000000 +0200
+++ argus-3.0.0.rc.34/argus/ArgusEsp.c 2006-12-20 15:57:17.000000000 +0100
@@ -123,7 +123,7 @@ ArgusUpdateESPState (struct ArgusModeler
flowstr->dsrs[ARGUS_NETWORK_INDEX] = (void *) net;
- bzero ((char *)espObj, sizeof(*espObj));
+ memset ((char *)espObj, 0, sizeof(*espObj));
flowstr->timeout = ARGUS_IPTIMEOUT;
espObj->spi = esp->spi;
diff -rup argus-3.0.0.rc.34.orig/argus/ArgusFrag.c argus-3.0.0.rc.34/argus/ArgusFrag.c
--- argus-3.0.0.rc.34.orig/argus/ArgusFrag.c 2006-08-18 19:15:14.000000000 +0200
+++ argus-3.0.0.rc.34/argus/ArgusFrag.c 2006-12-20 16:18:25.000000000 +0100
@@ -232,7 +232,7 @@ ArgusUpdateFRAGState (struct ArgusModele
if (prvfragOffset != NULL) {
prvfragOffset->nxt = fragOffset->nxt;
} else {
- bcopy((char *) fragOffset->nxt , (char *)&frag->offsets, sizeof(frag->offsets));
+ memmove((char *)&frag->offsets, (char *) fragOffset->nxt, sizeof(frag->offsets));
}
/* else just update the prv fragments pointer to toss this one */
} else {
diff -rup argus-3.0.0.rc.34.orig/argus/ArgusIcmp.c argus-3.0.0.rc.34/argus/ArgusIcmp.c
--- argus-3.0.0.rc.34.orig/argus/ArgusIcmp.c 2006-10-30 19:26:51.000000000 +0100
+++ argus-3.0.0.rc.34/argus/ArgusIcmp.c 2006-12-20 16:07:09.000000000 +0100
@@ -159,8 +159,9 @@ ArgusCreateICMPFlow (struct ArgusModeler
case ICMP_UNREACH_NET:
case ICMP_UNREACH_HOST:
- bcopy ((char *) &icmp->icmp_ip.ip_dst.s_addr,
- (char *)&icmpFlow->id, sizeof (int));
+ memmove ((char *)&icmpFlow->id,
+ (char*) &icmp->icmp_ip.ip_dst.s_addr,
+ sizeof (int));
break;
}
break;
@@ -174,7 +175,7 @@ ArgusCreateICMPFlow (struct ArgusModeler
case ICMP_REDIRECT_NET:
case ICMP_REDIRECT_HOST:
- bcopy ((char *) &icmp->icmp_ip.ip_dst.s_addr, (char *)&icmpFlow->id, sizeof (int));
+ memmove ((char *)&icmpFlow->id, (char *) &icmp->icmp_ip.ip_dst.s_addr, sizeof (int));
break;
}
break;
@@ -220,7 +221,7 @@ ArgusUpdateICMPState (struct ArgusModele
net->hdr.subtype = ARGUS_ICMP_DSR;
net->hdr.argus_dsrvl8.qual = 0;
net->hdr.argus_dsrvl8.len = ((sizeof(struct ArgusICMPObject)+3))/4 + 1;
- bzero ((char *)icmpObj, sizeof(*icmpObj));
+ memset ((char *)icmpObj, 0, sizeof(*icmpObj));
icmpObj->icmp_type = icmp->icmp_type;
icmpObj->icmp_code = icmp->icmp_code;
@@ -314,7 +315,7 @@ ArgusUpdateICMPState (struct ArgusModele
}
dsr->argus_dsrvl8.len = (sizeof (struct ArgusIcmpStruct) + 3)/4 + 1;
- bcopy ((char *) icmpObj, (char *) (dsr + 1), sizeof (*icmpObj));
+ memmove ((char *) (dsr + 1), (char *) icmpObj, sizeof (*icmpObj));
flow->dsrs[ARGUS_ICMP_INDEX] = dsr;
flow->dsrindex |= 1 << ARGUS_ICMP_INDEX;
@@ -361,7 +362,7 @@ ArgusUpdateICMPv6State (struct ArgusMode
net->hdr.subtype = ARGUS_ICMP_DSR;
net->hdr.argus_dsrvl8.qual = 0;
net->hdr.argus_dsrvl8.len = ((sizeof(struct ArgusICMPObject)+3))/4 + 1;
- bzero ((char *)icmpObj, sizeof(*icmpObj));
+ memset ((char *)icmpObj, 0, sizeof(*icmpObj));
icmpObj->icmp_type = icmpv6->icmp6_type;
icmpObj->icmp_code = icmpv6->icmp6_code;
diff -rup argus-3.0.0.rc.34.orig/argus/ArgusMac.c argus-3.0.0.rc.34/argus/ArgusMac.c
--- argus-3.0.0.rc.34.orig/argus/ArgusMac.c 2006-08-18 19:15:14.000000000 +0200
+++ argus-3.0.0.rc.34/argus/ArgusMac.c 2006-12-20 16:18:44.000000000 +0100
@@ -44,7 +44,7 @@ ArgusMacFlowRecord (struct ArgusFlowStru
struct ArgusMacStruct *mac = (struct ArgusMacStruct *) flowstr->MacDSRBuffer;
if (mac && ((length = argus->ahdr.length) > 0)) {
- bcopy ((char *)mac, &((char *)argus)[argus->ahdr.length], sizeof(*mac));
+ memmove (&((char *)argus)[argus->ahdr.length], (char *)mac, sizeof(*mac));
argus->ahdr.length += sizeof(*mac);
}
}
diff -rup argus-3.0.0.rc.34.orig/argus/ArgusModeler.c argus-3.0.0.rc.34/argus/ArgusModeler.c
--- argus-3.0.0.rc.34.orig/argus/ArgusModeler.c 2006-09-26 06:28:16.000000000 +0200
+++ argus-3.0.0.rc.34/argus/ArgusModeler.c 2006-12-20 16:17:19.000000000 +0100
@@ -112,7 +112,7 @@ void *ArgusQueueManager(void *);
void
ArgusInitModeler(struct ArgusModelerStruct *model)
{
- bzero (model->ArgusTimeOutQueues, sizeof(model->ArgusTimeOutQueues));
+ memset (model->ArgusTimeOutQueues, 0, sizeof(model->ArgusTimeOutQueues));
model->ArgusInProtocol = 1;
model->ArgusUpdateInterval.tv_usec = 200000;
model->ArgusMajorVersion = VERSION_MAJOR;
@@ -525,7 +525,7 @@ ArgusProcessPacketHdrs (struct ArgusMode
model->ArgusThisEncaps |= ARGUS_ENCAPS_LLC;
llc = model->ArgusThisLLC;
- bcopy((char *) ptr, (char *) llc, sizeof (struct llc));
+ memmove((char *) llc, (char *) ptr, sizeof (struct llc));
#define ARGUS_IPX_TAG 100
@@ -772,7 +772,7 @@ ArgusProcessEtherHdr (struct ArgusModele
model->ArgusThisEncaps |= ARGUS_ENCAPS_LLC;
llc = model->ArgusThisLLC;
- bcopy((char *) ptr, (char *) llc, sizeof (struct llc));
+ memmove((char *) llc, (char *) ptr, sizeof (struct llc));
#define ARGUS_IPX_TAG 100
@@ -1314,11 +1314,11 @@ ArgusCreateFlow (struct ArgusModelerStru
}
if (dstgteq) {
- bcopy ((char *) ep, (char *)&model->ArgusThisFlow->mac_flow.ehdr, sizeof (struct ether_header));
+ memmove ((char *)&model->ArgusThisFlow->mac_flow.ehdr, (char *) ep, sizeof (struct ether_header));
} else {
model->state |= ARGUS_DIRECTION;
- bcopy ((char *)&ep->ether_shost, (char *)&model->ArgusThisFlow->mac_flow.ehdr.ether_dhost, ETH_ALEN);
- bcopy ((char *)&ep->ether_dhost, (char *)&model->ArgusThisFlow->mac_flow.ehdr.ether_shost, ETH_ALEN);
+ memmove ((char *)&model->ArgusThisFlow->mac_flow.ehdr.ether_dhost, (char *)&ep->ether_shost, ETH_ALEN);
+ memmove ((char *)&model->ArgusThisFlow->mac_flow.ehdr.ether_shost, (char *)&ep->ether_dhost, ETH_ALEN);
model->ArgusThisFlow->mac_flow.ehdr.ether_type = ep->ether_type;
}
@@ -1418,7 +1418,7 @@ ArgusNewFlow (struct ArgusModelerStruct
retn->qhdr.qtime.tv_sec = 0;
retn->qhdr.qtime.tv_usec = 0;
- bzero ((char *)retn->dsrs, sizeof(retn->dsrs));
+ memset ((char *)retn->dsrs, 0, sizeof(retn->dsrs));
retn->dsrs[ARGUS_TRANSPORT_INDEX] = &retn->canon.trans.hdr;
trans = (struct ArgusTransportStruct *) retn->dsrs[ARGUS_TRANSPORT_INDEX];
@@ -1429,7 +1429,7 @@ ArgusNewFlow (struct ArgusModelerStruct
retn->dsrs[ARGUS_TIME_INDEX] = (struct ArgusDSRHeader *) &retn->canon.time.hdr;
dtime = (struct ArgusTimeObject *) retn->dsrs[ARGUS_TIME_INDEX];
- bzero((char *)dtime, sizeof(*dtime));
+ memset((char *)dtime, 0, sizeof(*dtime));
dtime->hdr.type = ARGUS_TIME_DSR;
dtime->hdr.subtype = ARGUS_TIME_ABSOLUTE_TIMESTAMP;
dtime->hdr.argus_dsrvl8.qual = ARGUS_TYPE_UTC_MICROSECONDS;
@@ -1446,10 +1446,10 @@ ArgusNewFlow (struct ArgusModelerStruct
retn->dsrs[ARGUS_FLOW_INDEX] = (struct ArgusDSRHeader *) &retn->canon.flow.hdr;
retn->canon.flow.hdr = flow->hdr;
- bcopy ((char *)&flow->flow_un, (char *)&retn->canon.flow.flow_un, (flow->hdr.argus_dsrvl8.len - 1) * 4);
+ memmove ((char *)&retn->canon.flow.flow_un, (char *)&flow->flow_un, (flow->hdr.argus_dsrvl8.len - 1) * 4);
retn->dsrindex |= 1 << ARGUS_FLOW_INDEX;
- bzero ((char *)&retn->canon.metric, sizeof(retn->canon.metric));
+ memset ((char *)&retn->canon.metric, 0, sizeof(retn->canon.metric));
/*
if (retn->status & ARGUS_DIRECTION)
retn->dsrs[ARGUS_FLOW_INDEX]->subtype |= ARGUS_REVERSE;
@@ -1573,7 +1573,7 @@ ArgusUpdateBasicFlow (struct ArgusModele
mac->hdr.argus_dsrvl8.len = 5;
if (model->ArgusThisEpHdr != NULL)
- bcopy ((char *)model->ArgusThisEpHdr, (char *)&mac->mac_union.ether, sizeof(struct ether_header));
+ memmove ((char *)&mac->mac_union.ether, (char *)model->ArgusThisEpHdr, sizeof(struct ether_header));
flow->dsrindex |= 1 << ARGUS_MAC_INDEX;
@@ -1652,8 +1652,8 @@ ArgusUpdateBasicFlow (struct ArgusModele
jitter->hdr.argus_dsrvl8.len = 1;
flow->dsrindex |= 1 << ARGUS_JITTER_INDEX;
- bzero((char *)&jitter->act, sizeof(struct ArgusJitterObject));
- bzero((char *)&jitter->idle, sizeof(struct ArgusJitterObject));
+ memset((char *)&jitter->act, 0, sizeof(struct ArgusJitterObject));
+ memset((char *)&jitter->idle, 0, sizeof(struct ArgusJitterObject));
memset(&flow->stime.act, 0, sizeof(flow->stime.act));
memset(&flow->stime.idle, 0, sizeof(flow->stime.idle));
@@ -2094,7 +2094,7 @@ ArgusGenerateRecord (struct ArgusModeler
int i, x, len = 0, type = 0, dsrlen = 1;
struct ArgusDSRHeader *dsr;
- bcopy ((char *)&rec->hdr, (char *)&retn->hdr, sizeof(retn->hdr));
+ memmove ((char *)&retn->hdr, (char *)&rec->hdr, sizeof(retn->hdr));
dsrptr = (unsigned int *)&retn->ar_un.mar;
if ((rec->canon.trans.seqnum = model->ArgusSeqNum++) == 0xFFFFFFFF)
@@ -2441,7 +2441,7 @@ ArgusGenerateRecord (struct ArgusModeler
retn->hdr.len = dsrlen;
} else {
- bcopy ((char *)&rec->canon, (char *) retn, rec->hdr.len * 4);
+ memmove ((char *) retn, (char *)&rec->canon, rec->hdr.len * 4);
retn->hdr = rec->hdr;
}
@@ -2470,8 +2470,8 @@ ArgusCopyRecordStruct (struct ArgusRecor
if (rec) {
if ((retn = (struct ArgusRecordStruct *) ArgusMallocListRecord (sizeof(*retn))) != NULL) {
- bcopy ((char *)&rec->hdr, (char *)&retn->hdr, sizeof (rec->hdr));
- bcopy ((char *)&rec->canon, (char *)&retn->canon, sizeof (rec->canon));
+ memmove ((char *)&retn->hdr, (char *)&rec->hdr, sizeof (rec->hdr));
+ memmove ((char *)&retn->canon, (char *)&rec->canon, sizeof (rec->canon));
if ((retn->dsrindex = rec->dsrindex)) {
for (i = 0; i < ARGUSMAXFLOWTYPE; i++) {
@@ -2494,7 +2494,7 @@ ArgusCopyRecordStruct (struct ArgusRecor
struct ArgusDataStruct *user = (struct ArgusDataStruct *) rec->dsrs[i];
if (user->count > 0) {
if ((retn->dsrs[i] = (void *) ArgusCalloc(1, (8 + user->size))) != NULL) {
- bcopy ((char *)rec->dsrs[i], (char *)retn->dsrs[i], 8 + user->size);
+ memmove ((char *)retn->dsrs[i], (char *)rec->dsrs[i], 8 + user->size);
} else {
retn->dsrindex &= ~(0x01 << i);
}
@@ -2541,7 +2541,7 @@ ArgusGenerateListRecord (struct ArgusMod
if ((retn = (struct ArgusRecordStruct *) ArgusMallocListRecord (sizeof(*retn))) != NULL) {
if (flow) {
- bcopy ((char *)&flow->canon, (char *)&retn->canon, sizeof (flow->canon));
+ memmove ((char *)&retn->canon, (char *)&flow->canon, sizeof (flow->canon));
if ((retn->dsrindex = flow->dsrindex) != 0) {
for (i = 0; i < ARGUSMAXFLOWTYPE; i++) {
if (flow->dsrs[i] != NULL) {
@@ -2691,8 +2691,8 @@ ArgusGenerateListRecord (struct ArgusMod
} else {
retn->dsrindex = 0;
- bzero ((char *)&retn->canon, sizeof(retn->canon));
- bzero ((char *)retn->dsrs, sizeof(retn->dsrs));
+ memset ((char *)&retn->canon, 0, sizeof(retn->canon));
+ memset ((char *)retn->dsrs, 0, sizeof(retn->dsrs));
}
if (!(flow) && ((state == ARGUS_STOP) || (state == ARGUS_ERROR))) {
@@ -3017,7 +3017,7 @@ ArgusCreateIPv4Flow (struct ArgusModeler
model->ArgusSnapLength -= hlen;
if (model->ArgusFlowKey & ARGUS_FLOW_KEY_CLASSIC5TUPLE) {
- bzero ((char *)model->ArgusThisFlow, sizeof(*model->ArgusThisFlow));
+ memset ((char *)model->ArgusThisFlow, 0, sizeof(*model->ArgusThisFlow));
model->ArgusThisFlow->hdr.type = ARGUS_FLOW_DSR;
model->ArgusThisFlow->hdr.subtype = ARGUS_FLOW_CLASSIC5TUPLE;
model->ArgusThisFlow->hdr.argus_dsrvl8.qual = ARGUS_TYPE_IPV4;
diff -rup argus-3.0.0.rc.34.orig/argus/ArgusOutput.c argus-3.0.0.rc.34/argus/ArgusOutput.c
--- argus-3.0.0.rc.34.orig/argus/ArgusOutput.c 2006-10-16 21:57:15.000000000 +0200
+++ argus-3.0.0.rc.34/argus/ArgusOutput.c 2006-12-20 16:21:26.000000000 +0100
@@ -530,7 +530,7 @@ ArgusEstablishListen (struct ArgusOutput
#endif
if ((host = gethostbyname (bindIP)) != NULL) {
if ((host->h_addrtype == AF_INET) && (host->h_length == 4)) {
- bcopy ((char *) *host->h_addr_list, (char *)&sin.sin_addr.s_addr, host->h_length);
+ memmove ((char *)&sin.sin_addr.s_addr, (char *) *host->h_addr_list, host->h_length);
} else
ArgusLog (LOG_ERR, "ArgusEstablishListen() unsupported bind address %s", bindIP);
} else
@@ -600,7 +600,7 @@ ArgusCheckClientStatus (struct ArgusOutp
if (output->clientnum < ARGUS_MAXLISTEN) {
int i = output->clientnum++;
- bzero(&output->clients[i], sizeof(output->clients[i]));
+ memset(&output->clients[i], 0, sizeof(output->clients[i]));
output->clients[i].fd = fd;
#ifdef ARGUSDEBUG
ArgusDebug (2, "ArgusCheckClientStatus() new client %d\n", i);
@@ -754,7 +754,7 @@ ArgusCheckClientMessage (struct ArgusOut
ArgusLog (LOG_ERR, "ArgusCheckClientMessage(0x%x, %d) sasl_getprop %s\n", client, fd, strerror(errno));
#endif /* ARGUS_SASL */
- bzero(buf, MAXSTRLEN);
+ memset(buf, 0, MAXSTRLEN);
if (value == 0)
value = MAXSTRLEN;
@@ -791,8 +791,8 @@ ArgusCheckClientMessage (struct ArgusOut
#endif
if (outputlen > 0) {
if (outputlen < MAXSTRLEN) {
- bzero (buf, MAXSTRLEN);
- bcopy (outputbuf, buf, outputlen);
+ memset (buf, 0, MAXSTRLEN);
+ memmove (buf, outputbuf, outputlen);
cnt = outputlen;
} else
ArgusLog (LOG_ERR, "ArgusCheckClientMessage(0x%x, %d) sasl_decode returned %d bytes\n", client, fd, outputlen);
diff -rup argus-3.0.0.rc.34.orig/argus/ArgusSource.c argus-3.0.0.rc.34/argus/ArgusSource.c
--- argus-3.0.0.rc.34.orig/argus/ArgusSource.c 2006-10-30 19:53:29.000000000 +0100
+++ argus-3.0.0.rc.34/argus/ArgusSource.c 2006-12-20 16:05:50.000000000 +0100
@@ -92,11 +92,11 @@ ArgusInitSource (struct ArgusSourceStruc
src->ArgusInterfaces = 0;
for (i = 0; i < ARGUS_MAXINTERFACE; i++)
- bzero ((char *)&src->ArgusInterface[i], sizeof(struct ArgusInterfaceStruct));
+ memset ((char *)&src->ArgusInterface[i], 0, sizeof(struct ArgusInterfaceStruct));
if (src->ArgusRfileList != NULL) {
setuid(getuid());
- bzero(errbuf, sizeof(errbuf));
+ memset(errbuf, 0, sizeof(errbuf));
if (ArgusOpenInputPacketFile(src, errbuf) == 0) {
}
@@ -156,7 +156,7 @@ ArgusInitSource (struct ArgusSourceStruc
src->ArgusInputFilter = cmdbuf;
}
- bzero ((char *) &src->ArgusInterface[0].ArgusFilter, sizeof (struct bpf_program));
+ memset ((char *) &src->ArgusInterface[0].ArgusFilter, 0, sizeof (struct bpf_program));
if (pcap_compile (src->ArgusInterface[0].ArgusPd, &src->ArgusInterface[0].ArgusFilter, src->ArgusInputFilter, getArgusOflag(src), src->ArgusInterface[0].ArgusNetMask) < 0)
ArgusLog (LOG_ERR, "%s\n", pcap_geterr (src->ArgusInterface[0].ArgusPd));
@@ -421,7 +421,7 @@ ArgusMoatTshRead (struct ArgusSourceStru
int retn = 0, length = 0;
struct ip *iphdr = NULL;
- bzero (ArgusMoatPktHdr, sizeof(MoatTshBuffer));
+ memset (ArgusMoatPktHdr, 0, sizeof(MoatTshBuffer));
if ((retn = read(pcap_fileno(src->ArgusInterface[0].ArgusPd), ArgusMoatPktHdr, ARGUSMOATLEN)) == ARGUSMOATLEN) {
ArgusMoatPktHdr->interface = 0;
@@ -666,7 +666,7 @@ ArgusArcnetPacket (u_char *user, const s
caplen -= archdrlen;
p += archdrlen;
- bcopy (p, (char *)ep, caplen);
+ memmove ((char *)ep, p, caplen);
src->ArgusModel->ArgusThisLength = length;
src->ArgusModel->ArgusSnapLength = caplen;
@@ -973,8 +973,8 @@ Argusextract_fddi_addrs(const struct fdd
fsrc[i] = fddi_bit_swap[fp->fddi_shost[i]];
}
else {
- bcopy ((char *) fp->fddi_dhost, fdst, 6);
- bcopy ((char *) fp->fddi_shost, fsrc, 6);
+ memmove (fdst, (char *) fp->fddi_dhost, 6);
+ memmove (fsrc, (char *) fp->fddi_shost, 6);
}
}
@@ -994,7 +994,7 @@ ArgusCreatePktFromFddi(const struct fddi
((struct ether_header *) ep)->ether_type = EXTRACT_16BITS(&llc->ethertype[0]);
ptr = (unsigned char *)(llc + 1);
length -= (sizeof(struct fddi_header) + sizeof(struct llc));
- bcopy ((char *)ptr, (char *)(ep + 1), length);
+ memmove ((char *)(ep + 1), (char *)ptr, length);
retn = length + sizeof(struct ether_header);
}
}
@@ -1099,7 +1099,7 @@ ArgusATMPacket(u_char *user, const struc
caplen -= ARGUS_ATM_HDR_OFFSET;
p += ARGUS_ATM_HDR_OFFSET;
- bcopy (p, (char *)(ep + 1), caplen);
+ memmove ((char *)(ep + 1), p, caplen);
length += sizeof(*ep);
caplen += sizeof(*ep);
@@ -1752,7 +1752,7 @@ ArgusGetInterfaceStatus (struct ArgusSou
if (strstr(device->name, "dag")) {
for (i = 0; i < src->ArgusInterfaces; i++) {
if (src->ArgusInterface[i].ArgusPd && (pcap_fileno(src->ArgusInterface[i].ArgusPd) > 0))
- bzero ((char *)&src->ArgusInterface[i].ifr, sizeof(ifr));
+ memset ((char *)&src->ArgusInterface[i].ifr, 0, sizeof(ifr));
src->ArgusInterface[i].ifr.ifr_flags |= IFF_UP;
setArgusInterfaceStatus(src, 1);
diff -rup argus-3.0.0.rc.34.orig/argus/ArgusTcp.c argus-3.0.0.rc.34/argus/ArgusTcp.c
--- argus-3.0.0.rc.34.orig/argus/ArgusTcp.c 2006-10-30 19:07:13.000000000 +0100
+++ argus-3.0.0.rc.34/argus/ArgusTcp.c 2006-12-20 16:17:49.000000000 +0100
@@ -89,7 +89,7 @@ ArgusUpdateTCPState (struct ArgusModeler
net->hdr.argus_dsrvl8.len = ((sizeof(struct ArgusTCPObject)+3))/4 + 1;
flowstr->dsrs[ARGUS_NETWORK_INDEX] = (struct ArgusDSRHeader *) net;
tcpExt = &net->net_union.tcp;
- bzero ((char *)tcpExt, sizeof(*tcpExt));
+ memset ((char *)tcpExt, 0, sizeof(*tcpExt));
model->ArgusSnapLength -= tcphlen;
model->ArgusThisLength = tcpdatalen;
@@ -287,7 +287,7 @@ ArgusInitializeTCP (struct ArgusModelerS
{
struct ArgusTCPObject *tcpExt = (struct ArgusTCPObject *)&flow->canon.net.net_union.tcp;
- bzero ((char *)tcpExt, sizeof(*tcpExt));
+ memset ((char *)tcpExt, 0, sizeof(*tcpExt));
flow->qhdr.lasttime.tv_sec = 0;
flow->qhdr.lasttime.tv_usec = 0;
@@ -684,7 +684,7 @@ ArgusTCPFlowRecord (struct ArgusNetworkS
tcpExt->dst.ackbytes++;
if (tcp && ((length = argus->hdr.len) > 0)) {
- bcopy ((char *)tcp, &((char *)argus)[length], sizeof(*tcp));
+ memmove (&((char *)argus)[length], (char *)tcp, sizeof(*tcp));
argus->hdr.len += sizeof(*tcp);
}
diff -rup argus-3.0.0.rc.34.orig/argus/ArgusUtil.c argus-3.0.0.rc.34/argus/ArgusUtil.c
--- argus-3.0.0.rc.34.orig/argus/ArgusUtil.c 2006-11-03 18:44:23.000000000 +0100
+++ argus-3.0.0.rc.34/argus/ArgusUtil.c 2006-12-20 16:19:14.000000000 +0100
@@ -854,8 +854,8 @@ ArgusZeroRecord (struct ArgusFlowStruct
case ARGUS_JITTER_INDEX: {
struct ArgusJitterStruct *jit = (void *)flow->dsrs[i];
- bzero ((char *)&jit->act, sizeof(struct ArgusJitterObject));
- bzero ((char *)&jit->idle, sizeof(struct ArgusJitterObject));
+ memset ((char *)&jit->act, 0, sizeof(struct ArgusJitterObject));
+ memset ((char *)&jit->idle, 0, sizeof(struct ArgusJitterObject));
jit->act.src.minval = 0xffffffff;
jit->idle.src.minval = 0xffffffff;
jit->act.dst.minval = 0xffffffff;
@@ -1105,7 +1105,7 @@ ArgusWriteSocket (struct ArgusOutputStru
ArgusDebug (3, "ArgusHandleClientData: sasl_encode returned %d bytes\n", outputlen);
#endif
if (outputlen < ARGUS_MAXRECORD) {
- bcopy(output, asock->buf, outputlen);
+ memmove(asock->buf, output, outputlen);
cnt = outputlen;
} else
ArgusLog (LOG_ERR, "sasl_encode: returned too many bytes %d\n", outputlen);
@@ -1282,7 +1282,7 @@ ArgusWriteOutSocket (struct ArgusOutputS
ArgusDebug (3, "ArgusHandleClientData: sasl_encode returned %d bytes\n", outputlen);
#endif
if (outputlen < ARGUS_MAXRECORD) {
- bcopy(output, asock->buf, outputlen);
+ memmove(asock->buf, output, outputlen);
cnt = outputlen;
} else
diff -rup argus-3.0.0.rc.34.orig/argus/argus.c argus-3.0.0.rc.34/argus/argus.c
--- argus-3.0.0.rc.34.orig/argus/argus.c 2006-11-03 19:54:13.000000000 +0100
+++ argus-3.0.0.rc.34/argus/argus.c 2006-12-20 16:12:47.000000000 +0100
@@ -303,7 +303,7 @@ main (int argc, char *argv[])
if ((host = gethostbyname(optarg)) != NULL) {
if ((host->h_addrtype == 2) && (host->h_length == 4)) {
unsigned int addr;
- bcopy ((char *) *host->h_addr_list, (char *)&addr, host->h_length);
+ memmove ((char *)&addr, (char *) *host->h_addr_list, host->h_length);
#if defined(_LITTLE_ENDIAN)
setArgusID (ArgusModel, ntohl(addr));
#else
@@ -499,7 +499,7 @@ ArgusComplete ()
if (ArgusSourceTask->ArgusStartTime.tv_sec == 0)
ArgusSourceTask->ArgusStartTime = ArgusSourceTask->ArgusEndTime;
- bzero(buf, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
timediff.tv_sec = ArgusSourceTask->ArgusEndTime.tv_sec - ArgusSourceTask->ArgusStartTime.tv_sec;
timediff.tv_usec = ArgusSourceTask->ArgusEndTime.tv_usec - ArgusSourceTask->ArgusStartTime.tv_usec;
@@ -784,7 +784,7 @@ ArgusParseResourceFile (struct ArgusMode
if ((host = gethostbyname(optarg)) != NULL) {
if ((host->h_addrtype == 2) && (host->h_length == 4)) {
unsigned int addr;
- bcopy ((char *) *host->h_addr_list, (char *)&addr, host->h_length);
+ memmove ((char *)&addr, (char *) *host->h_addr_list, host->h_length);
#if defined(_LITTLE_ENDIAN)
setArgusID (model, ntohl(addr));
#else
diff -rup argus-3.0.0.rc.34.orig/common/argus_auth.c argus-3.0.0.rc.34/common/argus_auth.c
--- argus-3.0.0.rc.34.orig/common/argus_auth.c 2006-08-18 19:15:14.000000000 +0200
+++ argus-3.0.0.rc.34/common/argus_auth.c 2006-12-20 16:56:47.000000000 +0100
@@ -473,12 +473,12 @@ RaSendSaslString (FILE *f, const char *s
char saslbuf[MAXSTRLEN];
int len, al = 0;
- bzero (saslbuf, MAXSTRLEN);
+ memset (saslbuf, 0, MAXSTRLEN);
snprintf(saslbuf, MAXSTRLEN, "{%d}\r\n", l);
len = strlen(saslbuf);
- bcopy (s, &saslbuf[len], l);
+ memmove (&saslbuf[len], s, l);
len += l;
al = fwrite(saslbuf, 1, len, f);
diff -rup argus-3.0.0.rc.34.orig/common/argus_parse.c argus-3.0.0.rc.34/common/argus_parse.c
--- argus-3.0.0.rc.34.orig/common/argus_parse.c 2006-08-18 19:15:14.000000000 +0200
+++ argus-3.0.0.rc.34/common/argus_parse.c 2006-12-20 16:56:34.000000000 +0100
@@ -80,7 +80,7 @@ argus_parse_init (struct ARGUS_INPUT *in
if (input != NULL)
fd = input->fd;
- bzero((char *)&ArgusOutputFile, sizeof(ArgusOutputFile));
+ memset((char *)&ArgusOutputFile, 0, sizeof(ArgusOutputFile));
if (initCon) {
if (initCon->ahdr.status & ARGUS_DETAIL) detail++;
@@ -496,8 +496,8 @@ main (int argc, char **argv)
*RaInputFilter = cmdbuf;
}
- bzero ((char *) &ArgusFilterCode, sizeof (ArgusFilterCode));
- bzero ((char *) &pbuf, sizeof (pbuf));
+ memset ((char *) &ArgusFilterCode, 0, sizeof (ArgusFilterCode));
+ memset ((char *) &pbuf, 0, sizeof (pbuf));
if (ArgusFilterCompile (&pbuf, &ArgusFilterCode, *RaInputFilter, 1, ArgusNetMask) < 0) {
if (pbuf.errbuf[0] != '\0') {
@@ -574,7 +574,7 @@ main (int argc, char **argv)
} else {
struct ARGUS_INPUT addrbuf, *addr = &addrbuf;
- bzero ((char *) addr, sizeof (*addr));
+ memset ((char *) addr, 0, sizeof (*addr));
addr->fd = 0;
if (((ArgusReadConnection (addr, NULL)) >= 0)) {
@@ -628,8 +628,8 @@ ArgusHandleDatum (struct ArgusRecord *pt
u_char buf[MAXSTRLEN];
totalrecords++;
- bcopy ((char *)ptr, (char *)ArgusOriginal, len);
- bcopy ((char *)ptr, (char *)&buf, len);
+ memmove ((char *)ArgusOriginal, (char *)ptr, len);
+ memmove ((char *)&buf, (char *)ptr, len);
switch (ptr->ahdr.type) {
case ARGUS_MAR:
@@ -736,68 +736,68 @@ ArgusGenerateCanonicalRecord (struct Arg
hdrs = ArgusThisFarHdrs;
- bzero ((char *)canon, sizeof(*canon));
+ memset ((char *)canon, 0, sizeof(*canon));
if (ptr->ahdr.type & ARGUS_MAR) {
- bcopy ((char *)ptr, (char *)canon, sizeof(*ptr));
+ memmove ((char *)canon, (char *)ptr, sizeof(*ptr));
} else {
- bcopy ((char *)&ptr->ahdr, (char *)&canon->ahdr, sizeof(canon->ahdr));
+ memmove ((char *)&canon->ahdr, (char *)&ptr->ahdr, sizeof(canon->ahdr));
for (i = 1; i < 33; i++) {
index = 1 << (i - 1);
switch (index) {
case ARGUS_FAR_DSR_STATUS:
if (ArgusThisFarStatus & ARGUS_FAR_DSR_STATUS)
- bcopy((char *) hdrs[ARGUS_FAR_DSR_INDEX], (char *)&ar->argus_far, sizeof (ar->argus_far));
+ memmove((char *)&ar->argus_far, (char *) hdrs[ARGUS_FAR_DSR_INDEX], sizeof (ar->argus_far));
break;
case ARGUS_MAC_DSR_STATUS:
if (ArgusThisFarStatus & ARGUS_MAC_DSR_STATUS)
- bcopy((char *) hdrs[ARGUS_MAC_DSR_INDEX], (char *)&canon->mac, sizeof(canon->mac));
+ memmove((char *)&canon->mac, (char *) hdrs[ARGUS_MAC_DSR_INDEX], sizeof(canon->mac));
break;
case ARGUS_VLAN_DSR_STATUS:
if (ArgusThisFarStatus & ARGUS_VLAN_DSR_STATUS)
- bcopy((char *) hdrs[ARGUS_VLAN_DSR_INDEX], (char *)&canon->vlan, sizeof(canon->vlan));
+ memmove((char *)&canon->vlan, (char *) hdrs[ARGUS_VLAN_DSR_INDEX], sizeof(canon->vlan));
break;
case ARGUS_MPLS_DSR_STATUS:
if (ArgusThisFarStatus & ARGUS_MPLS_DSR_STATUS)
- bcopy((char *) hdrs[ARGUS_MPLS_DSR_INDEX], (char *)&canon->mpls, sizeof(canon->mpls));
+ memmove((char *)&canon->mpls, (char *) hdrs[ARGUS_MPLS_DSR_INDEX], sizeof(canon->mpls));
break;
case ARGUS_AGR_DSR_STATUS:
if (ArgusThisFarStatus & ARGUS_AGR_DSR_STATUS)
- bcopy((char *) hdrs[ARGUS_AGR_DSR_INDEX], (char *)&canon->agr, sizeof(canon->agr));
+ memmove((char *)&canon->agr, (char *) hdrs[ARGUS_AGR_DSR_INDEX], sizeof(canon->agr));
break;
case ARGUS_TIME_DSR_STATUS:
if (ArgusThisFarStatus & ARGUS_TIME_DSR_STATUS)
- bcopy((char *) hdrs[ARGUS_TIME_DSR_INDEX], (char *)&canon->time, sizeof(canon->time));
+ memmove((char *)&canon->time, (char *) hdrs[ARGUS_TIME_DSR_INDEX], sizeof(canon->time));
break;
case ARGUS_TCP_DSR_STATUS:
if (ArgusThisFarStatus & ARGUS_TCP_DSR_STATUS)
- bcopy((char *) hdrs[ARGUS_TCP_DSR_INDEX], (char *)&canon->acr_tcp, sizeof(canon->acr_tcp));
+ memmove((char *)&canon->acr_tcp, (char *) hdrs[ARGUS_TCP_DSR_INDEX], sizeof(canon->acr_tcp));
break;
case ARGUS_ICMP_DSR_STATUS:
if (ArgusThisFarStatus & ARGUS_ICMP_DSR_STATUS)
- bcopy((char *) hdrs[ARGUS_ICMP_DSR_INDEX], (char *)&canon->acr_icmp, sizeof(canon->acr_icmp));
+ memmove((char *)&canon->acr_icmp, (char *) hdrs[ARGUS_ICMP_DSR_INDEX], sizeof(canon->acr_icmp));
break;
case ARGUS_RTP_DSR_STATUS:
if (ArgusThisFarStatus & ARGUS_RTP_DSR_STATUS)
- bcopy((char *) hdrs[ARGUS_RTP_DSR_INDEX], (char *)&canon->acr_rtp, sizeof(canon->acr_rtp));
+ memmove((char *)&canon->acr_rtp, (char *) hdrs[ARGUS_RTP_DSR_INDEX], sizeof(canon->acr_rtp));
break;
case ARGUS_IGMP_DSR_STATUS:
if (ArgusThisFarStatus & ARGUS_IGMP_DSR_STATUS)
- bcopy((char *) hdrs[ARGUS_IGMP_DSR_INDEX], (char *)&canon->acr_igmp, sizeof(canon->acr_igmp));
+ memmove((char *)&canon->acr_igmp, (char *) hdrs[ARGUS_IGMP_DSR_INDEX], sizeof(canon->acr_igmp));
break;
case ARGUS_ARP_DSR_STATUS:
if (ArgusThisFarStatus & ARGUS_ARP_DSR_STATUS)
- bcopy((char *) hdrs[ARGUS_ARP_DSR_INDEX], (char *)&canon->acr_arp, sizeof(canon->acr_arp));
+ memmove((char *)&canon->acr_arp, (char *) hdrs[ARGUS_ARP_DSR_INDEX], sizeof(canon->acr_arp));
break;
case ARGUS_FRG_DSR_STATUS:
if (ArgusThisFarStatus & ARGUS_FRG_DSR_STATUS)
- bcopy((char *) hdrs[ARGUS_FRG_DSR_INDEX], (char *)&canon->acr_frag, sizeof(canon->acr_frag));
+ memmove((char *)&canon->acr_frag, (char *) hdrs[ARGUS_FRG_DSR_INDEX], sizeof(canon->acr_frag));
break;
case ARGUS_ESP_DSR_STATUS:
if (ArgusThisFarStatus & ARGUS_ESP_DSR_STATUS)
- bcopy((char *) hdrs[ARGUS_ESP_DSR_INDEX], (char *)&canon->acr_esp, sizeof(canon->acr_esp));
+ memmove((char *)&canon->acr_esp, (char *) hdrs[ARGUS_ESP_DSR_INDEX], sizeof(canon->acr_esp));
break;
}
}
@@ -829,7 +829,7 @@ ArgusParseCiscoRecordV1 (u_char **ptr)
struct ArgusRecord *argus = ArgusNetFlowArgusRecord;
struct ArgusMacStruct mac;
- bzero ((char *) argus, sizeof (*argus));
+ memset ((char *) argus, 0, sizeof (*argus));
argus->ahdr.type = ARGUS_FAR | ARGUS_CISCO_NETFLOW;
argus->ahdr.cause = ARGUS_STATUS;
argus->ahdr.length = sizeof(argus->ahdr) + sizeof(argus->argus_far);
@@ -868,7 +868,7 @@ ArgusParseCiscoRecordV1 (u_char **ptr)
case IPPROTO_TCP: {
struct ArgusTCPObject tcpbuf, *tcp = &tcpbuf;
- bzero ((char *) tcp, sizeof(*tcp));
+ memset ((char *) tcp, 0, sizeof(*tcp));
tcp->type = ARGUS_TCP_DSR;
tcp->length = sizeof(struct ArgusTCPObject);
tcp->src.flags = entryPtrV1->flags;
@@ -888,7 +888,7 @@ ArgusParseCiscoRecordV1 (u_char **ptr)
break;
}
- bcopy ((char *)tcp, &((char *)argus)[argus->ahdr.length], sizeof(*tcp));
+ memmove (&((char *)argus)[argus->ahdr.length], (char *)tcp, sizeof(*tcp));
argus->ahdr.length += sizeof(*tcp);
}
@@ -906,17 +906,17 @@ ArgusParseCiscoRecordV1 (u_char **ptr)
break;
}
- bzero ((char *)&mac, sizeof (mac));
+ memset ((char *)&mac, 0, sizeof (mac));
mac.type = ARGUS_MAC_DSR;
mac.length = sizeof(mac);
mac.status = 0;
entryPtrV1->input = ntohs(entryPtrV1->input);
entryPtrV1->output = ntohs(entryPtrV1->output);
- bcopy((char *)&entryPtrV1->input, (char *)&mac.phys_union.ether.ethersrc[4], 2);
- bcopy((char *)&entryPtrV1->output,(char *)&mac.phys_union.ether.etherdst[4], 2);
+ memmove((char *)&mac.phys_union.ether.ethersrc[4], (char *)&entryPtrV1->input, 2);
+ memmove((char *)&mac.phys_union.ether.etherdst[4], (char *)&entryPtrV1->output, 2);
- bcopy ((char *)&mac, &((char *)argus)[argus->ahdr.length], sizeof(mac));
+ memmove (&((char *)argus)[argus->ahdr.length], (char *)&mac, sizeof(mac));
argus->ahdr.length += sizeof(mac);
#ifdef _LITTLE_ENDIAN
@@ -939,7 +939,7 @@ ArgusParseCiscoRecordV5 (u_char **ptr)
struct ArgusRecord *argus = ArgusNetFlowArgusRecord;
struct ArgusMacStruct mac;
- bzero ((char *) argus, sizeof (*argus));
+ memset ((char *) argus, 0, sizeof (*argus));
argus->ahdr.type = ARGUS_FAR | ARGUS_CISCO_NETFLOW;
argus->ahdr.cause = ARGUS_STATUS;
argus->ahdr.length = sizeof(argus->ahdr) + sizeof(argus->argus_far);
@@ -980,7 +980,7 @@ ArgusParseCiscoRecordV5 (u_char **ptr)
case IPPROTO_TCP: {
struct ArgusTCPObject tcpbuf, *tcp = &tcpbuf;
- bzero ((char *) tcp, sizeof(*tcp));
+ memset ((char *) tcp, 0, sizeof(*tcp));
tcp->type = ARGUS_TCP_DSR;
tcp->length = sizeof(struct ArgusTCPObject);
tcp->src.flags = entryPtrV5->tcp_flags;
@@ -1000,23 +1000,23 @@ ArgusParseCiscoRecordV5 (u_char **ptr)
break;
}
- bcopy ((char *)tcp, &((char *)argus)[argus->ahdr.length], sizeof(*tcp));
+ memmove (&((char *)argus)[argus->ahdr.length], (char *)tcp, sizeof(*tcp));
argus->ahdr.length += sizeof(*tcp);
}
break;
}
- bzero ((char *)&mac, sizeof (mac));
+ memset ((char *)&mac, 0, sizeof (mac));
mac.type = ARGUS_MAC_DSR;
mac.length = sizeof(mac);
mac.status = 0;
entryPtrV5->input = ntohs(entryPtrV5->input);
entryPtrV5->output = ntohs(entryPtrV5->output);
- bcopy((char *)&entryPtrV5->input, (char *)&mac.phys_union.ether.ethersrc[4], 2);
- bcopy((char *)&entryPtrV5->output,(char *)&mac.phys_union.ether.etherdst[4], 2);
+ memmve((char *)&mac.phys_union.ether.ethersrc[4], (char *)&entryPtrV5->input, 2);
+ memmove((char *)&mac.phys_union.ether.etherdst[4], (char *)&entryPtrV5->output, 2);
- bcopy ((char *)&mac, &((char *)argus)[argus->ahdr.length], sizeof(mac));
+ memmove (&((char *)argus)[argus->ahdr.length], (char *)&mac, sizeof(mac));
argus->ahdr.length += sizeof(mac);
#ifdef _LITTLE_ENDIAN
@@ -1039,7 +1039,7 @@ ArgusParseCiscoRecordV6 (u_char **ptr)
struct ArgusRecord *argus = ArgusNetFlowArgusRecord;
struct ArgusMacStruct mac;
- bzero ((char *) argus, sizeof (*argus));
+ memset ((char *) argus, 0, sizeof (*argus));
argus->ahdr.type = ARGUS_FAR | ARGUS_CISCO_NETFLOW;
argus->ahdr.cause = ARGUS_STATUS;
argus->ahdr.length = sizeof(argus->ahdr) + sizeof(argus->argus_far);
@@ -1080,7 +1080,7 @@ ArgusParseCiscoRecordV6 (u_char **ptr)
case IPPROTO_TCP: {
struct ArgusTCPObject tcpbuf, *tcp = &tcpbuf;
- bzero ((char *) tcp, sizeof(*tcp));
+ memset ((char *) tcp, 0, sizeof(*tcp));
tcp->type = ARGUS_TCP_DSR;
tcp->length = sizeof(struct ArgusTCPObject);
tcp->src.flags = entryPtrV6->tcp_flags;
@@ -1100,23 +1100,23 @@ ArgusParseCiscoRecordV6 (u_char **ptr)
break;
}
- bcopy ((char *)tcp, &((char *)argus)[argus->ahdr.length], sizeof(*tcp));
+ memmve (&((char *)argus)[argus->ahdr.length], (char *)tcp, sizeof(*tcp));
argus->ahdr.length += sizeof(*tcp);
}
break;
}
- bzero ((char *)&mac, sizeof (mac));
+ memset ((char *)&mac, 0, sizeof (mac));
mac.type = ARGUS_MAC_DSR;
mac.length = sizeof(mac);
mac.status = 0;
entryPtrV6->input = ntohs(entryPtrV6->input);
entryPtrV6->output = ntohs(entryPtrV6->output);
- bcopy((char *)&entryPtrV6->input, (char *)&mac.phys_union.ether.ethersrc[4], 2);
- bcopy((char *)&entryPtrV6->output,(char *)&mac.phys_union.ether.etherdst[4], 2);
+ memmove((char *)&mac.phys_union.ether.ethersrc[4], (char *)&entryPtrV6->input, 2);
+ memmove((char *)&mac.phys_union.ether.etherdst[4], (char *)&entryPtrV6->output, 2);
- bcopy ((char *)&mac, &((char *)argus)[argus->ahdr.length], sizeof(mac));
+ memmove (&((char *)argus)[argus->ahdr.length], (char *)&mac, sizeof(mac));
argus->ahdr.length += sizeof(mac);
#ifdef _LITTLE_ENDIAN
@@ -1145,7 +1145,7 @@ ArgusParseCiscoRecord (u_char **ptr)
CiscoFlowHeaderV1_t *hdrPtrV1 = (CiscoFlowHeaderV1_t *) *ptr;
CiscoFlowEntryV1_t *entryPtrV1 = (CiscoFlowEntryV1_t *) (hdrPtrV1 + 1);
- bzero ((char *) argus, sizeof (*argus));
+ memset ((char *) argus, 0, sizeof (*argus));
argus->ahdr.type = ARGUS_FAR | ARGUS_CISCO_NETFLOW;
argus->ahdr.cause = ARGUS_STATUS;
argus->ahdr.length = sizeof(argus->ahdr) + sizeof(argus->argus_far);
@@ -1191,7 +1191,7 @@ ArgusParseCiscoRecord (u_char **ptr)
CiscoFlowHeaderV5_t *hdrPtrV5 = (CiscoFlowHeaderV5_t *) ptr;
CiscoFlowEntryV5_t *entryPtrV5 = (CiscoFlowEntryV5_t *) (hdrPtrV5 + 1);
- bzero ((char *) argus, sizeof (*argus));
+ memset ((char *) argus, 0, sizeof (*argus));
argus->ahdr.type = ARGUS_FAR | ARGUS_CISCO_NETFLOW;
argus->ahdr.cause = ARGUS_STATUS;
argus->ahdr.length = sizeof(argus->ahdr) + sizeof(argus->argus_far);
@@ -1238,7 +1238,7 @@ ArgusParseCiscoRecord (u_char **ptr)
CiscoFlowHeaderV6_t *hdrPtrV6 = (CiscoFlowHeaderV6_t *) ptr;
CiscoFlowEntryV6_t *entryPtrV6 = (CiscoFlowEntryV6_t *) (hdrPtrV6 + 1);
- bzero ((char *) argus, sizeof (*argus));
+ memset ((char *) argus, 0, sizeof (*argus));
argus->ahdr.type = ARGUS_FAR | ARGUS_CISCO_NETFLOW;
argus->ahdr.cause = ARGUS_STATUS;
argus->ahdr.length = sizeof(argus->ahdr) + sizeof(argus->argus_far);
@@ -1301,7 +1301,7 @@ ArgusNetFlowCallRecord (u_char **ptr)
BinaryRecord_CallRecord_V1 *call = (BinaryRecord_CallRecord_V1 *) *ptr;
if (*ptr) {
- bzero ((char *) argus, sizeof (*argus));
+ memset ((char *) argus, 0, sizeof (*argus));
argus->ahdr.type = ARGUS_FAR | ARGUS_CISCO_NETFLOW;
argus->ahdr.cause = ARGUS_STATUS;
argus->ahdr.length = sizeof(argus->ahdr) + sizeof(argus->argus_far);
@@ -1348,7 +1348,7 @@ ArgusNetFlowDetailInt (u_char **ptr)
if (*ptr) {
dint = NULL;
- bzero ((char *) argus, sizeof (*argus));
+ memset ((char *) argus, 0, sizeof (*argus));
}
@@ -1438,7 +1438,7 @@ ArgusReadConnection (struct ARGUS_INPUT
if (fd >= 0) {
if (!(Cflag)) {
- bzero ((char *) &argus, sizeof(argus));
+ memset ((char *) &argus, 0, sizeof(argus));
if ((cnt = read (fd, &argus, sizeof(argus.ahdr))) == sizeof(argus.ahdr)) {
#ifdef ARGUSDEBUG
ArgusDebug (5, "ArgusReadConnection() read %d bytes\n", cnt);
@@ -1447,7 +1447,7 @@ ArgusReadConnection (struct ARGUS_INPUT
if (((ptr[0] == 0x1F) && ((ptr[1] == 0x8B) || (ptr[1] == 0x9D))) ||
((ptr[0] == 'B') && (ptr[1] == 'Z') && (ptr[2] == 'h'))) {
char cmd[256];
- bzero(cmd, 256);
+ memset(cmd, 0, 256);
close(fd);
if (ptr[0] == 'B')
strcpy(cmd, "bzip2 -dc ");
@@ -1514,8 +1514,8 @@ ArgusReadConnection (struct ARGUS_INPUT
return (-1);
}
- bcopy ((char *) &argus, (char *)&input->ArgusInitCon, sizeof (argus));
- bcopy ((char *) &argus, (char *) ArgusOriginal, length);
+ memmove ((char *)&input->ArgusInitCon, (char *) &argus, sizeof (argus));
+ memmove ((char *) ArgusOriginal, (char *) &argus, length);
ArgusInput = input;
ArgusHandleDatum ((struct ArgusRecord *)&argus, &ArgusFilterCode);
@@ -1524,7 +1524,7 @@ ArgusReadConnection (struct ARGUS_INPUT
ArgusNtoH(&argus);
#endif
- bcopy ((char *) &argus, (char *)&input->ArgusManStart, sizeof (argus));
+ memmove ((char *)&input->ArgusManStart, (char *) &argus, sizeof (argus));
input->major_version = MAJOR_VERSION_2;
input->minor_version = MINOR_VERSION_0;
input->ArgusReadSize = argus.argus_mar.record_len;
@@ -1543,7 +1543,7 @@ ArgusReadConnection (struct ARGUS_INPUT
if ((ArgusRemoteFilter != NULL) && (filename == NULL) && (fd != 0)) {
int len;
- bzero(buf, MAXSTRLEN);
+ memset(buf, 0, MAXSTRLEN);
snprintf ((char *) buf, MAXSTRLEN-1, "FILTER: man or %s", (char *) ArgusRemoteFilter);
len = strlen((char *) buf);
if (ArgusWriteConnection (input, buf, len) < 0) {
@@ -1564,7 +1564,7 @@ ArgusReadConnection (struct ARGUS_INPUT
char *ptr;
int size;
- bcopy ((char *)&argus, buf, sizeof(argus.ahdr));
+ memmove (buf, (char *)&argus, sizeof(argus.ahdr));
size = sizeof(*ws) - sizeof(argus.ahdr);
@@ -1584,11 +1584,11 @@ ArgusReadConnection (struct ARGUS_INPUT
if (initCon == NULL) {
if ((initCon = (struct ArgusRecord *) calloc (1, sizeof (argus))) != NULL)
- bcopy ((char *) &argus, (char *) initCon, sizeof (argus));
+ memmove ((char *) initCon, (char *) &argus, sizeof (argus));
}
- bcopy ((char *) &argus, (char *)&input->ArgusInitCon, sizeof (argus));
- bcopy ((char *)&argus, (char *) ArgusOriginal, sizeof(argus));
+ memmove ((char *)&input->ArgusInitCon, (char *) &argus, sizeof (argus));
+ memmove ((char *) ArgusOriginal, (char *)&argus, sizeof(argus));
ArgusInput = input;
@@ -1617,7 +1617,7 @@ ArgusReadConnection (struct ARGUS_INPUT
BinaryHeaderF2 *ArgusNetFlow = (BinaryHeaderF2 *) buf;
int size;
- bcopy ((char *)&argus, buf, sizeof(argus.ahdr));
+ memmove (buf, (char *)&argus, sizeof(argus.ahdr));
size = sizeof(*ArgusNetFlow) - sizeof(argus.ahdr);
if ((cnt = read (fd, &buf[sizeof(argus.ahdr)], size)) != size) {
@@ -1633,7 +1633,7 @@ ArgusReadConnection (struct ARGUS_INPUT
ArgusNetFlow->missed = ntohl(ArgusNetFlow->missed);
ArgusNetFlow->records = ntohl(ArgusNetFlow->records);
#endif
- bzero ((char *)&argus, sizeof(argus));
+ memset ((char *)&argus, 0, sizeof(argus));
argus.ahdr.type = ARGUS_MAR | ARGUS_CISCO_NETFLOW;
argus.ahdr.length = sizeof (argus);
@@ -1657,11 +1657,11 @@ ArgusReadConnection (struct ARGUS_INPUT
#endif
if (initCon == NULL) {
if ((initCon = (struct ArgusRecord *) calloc (1, sizeof (argus))) != NULL)
- bcopy ((char *) &argus, (char *) initCon, sizeof (argus));
+ memmove ((char *) initCon, (char *) &argus, sizeof (argus));
}
- bcopy ((char *) &argus, (char *)&input->ArgusInitCon, sizeof (argus));
- bcopy ((char *) &argus, (char *) ArgusOriginal, sizeof(argus));
+ memmove ((char *)&input->ArgusInitCon, (char *) &argus, sizeof (argus));
+ memmove ((char *) ArgusOriginal, (char *) &argus, sizeof(argus));
ArgusInput = input;
ArgusGenerateCanonicalRecord (&argus, canon);
@@ -1702,7 +1702,7 @@ ArgusReadConnection (struct ARGUS_INPUT
#ifdef ARGUSDEBUG
ArgusDebug (2, "ArgusReadConnection(0x%x) reading from Cisco Router.\n", input);
#endif
- bzero ((char *)&argus, sizeof(argus));
+ memset ((char *)&argus, 0, sizeof(argus));
argus_parse_init (input);
}
}
@@ -1902,7 +1902,7 @@ ArgusReadSaslStreamSocket (struct ARGUS_
while ((char *)argus < end) {
input->ArgusReadSocketCnt = ntohs(argus->ahdr.length);
- bcopy (argus, input->ArgusReadBuffer, input->ArgusReadSocketCnt);
+ memmove (input->ArgusReadBuffer, argus, input->ArgusReadSocketCnt);
if (ArgusHandleDatum (argus, &ArgusFilterCode) == 1) {
if (!input->filename)
@@ -1970,7 +1970,7 @@ ArgusReadStreamSocket (struct ARGUS_INPU
if (input->ArgusReadSocketState == ARGUS_READINGHDR) {
input->ArgusReadSocketState = ARGUS_READINGBLOCK;
- bcopy ((char *) &((struct ArgusRecordHeader *)input->ArgusReadPtr)->length, (char *) &length, sizeof(length));
+ memmove ((char *) &length, (char *) &((struct ArgusRecordHeader *)input->ArgusReadPtr)->length, sizeof(length));
input->ArgusReadSocketSize = ntohs(length) - sizeof(struct ArgusRecordHeader);
if ((input->ArgusReadSocketSize > 0) && (input->ArgusReadSocketSize < MAXSTRLEN)) {
input->ArgusReadPtr = &input->ArgusReadBuffer[input->ArgusReadSocketCnt];
@@ -1986,7 +1986,7 @@ ArgusReadStreamSocket (struct ARGUS_INPU
if (input->major_version < 2) {
ArgusConvertWriteStruct ((struct WriteStruct *)input->ArgusReadBuffer,
(struct ArgusRecord *)input->ArgusConvBuffer);
- bcopy ((char *) input->ArgusConvBuffer, input->ArgusReadBuffer, MAXSTRLEN);
+ memmove (input->ArgusReadBuffer, (char *) input->ArgusConvBuffer, MAXSTRLEN);
}
if (ArgusHandleDatum ((struct ArgusRecord *)input->ArgusReadBuffer, &ArgusFilterCode) == 1) {
@@ -2002,7 +2002,7 @@ ArgusReadStreamSocket (struct ARGUS_INPU
}
input->ArgusReadPtr = input->ArgusReadBuffer;
- bzero (input->ArgusReadBuffer, MAXSTRLEN);
+ memset (input->ArgusReadBuffer, 0, MAXSTRLEN);
input->ArgusReadSocketCnt = 0;
}
}
@@ -2105,7 +2105,7 @@ ArgusReadCiscoStreamSocket (struct ARGUS
if (!(input->ArgusReadSocketNum--)) {
input->ArgusReadPtr = input->ArgusReadBuffer;
- bzero (input->ArgusReadBuffer, MAXSTRLEN);
+ memset (input->ArgusReadBuffer, 0, MAXSTRLEN);
} else {
input->ArgusReadPtr = input->ArgusReadBlockPtr;
@@ -2279,7 +2279,7 @@ ArgusReadStream ()
return;
}
- bzero ((char *)&timeoutValue, sizeof(timeoutValue));
+ memset ((char *)&timeoutValue, 0, sizeof(timeoutValue));
if (gettimeofday (&now, NULL) == 0) {
ArgusAdjustGlobalTime(&ArgusGlobalTime, &ArgusNowTime);
@@ -2535,7 +2535,7 @@ ArgusGetServerSocket (struct ARGUS_INPUT
} else
portnum = htons(input->portnum);
- bzero ((char *)&argus, sizeof(argus));
+ memset ((char *)&argus, 0, sizeof(argus));
argus.ahdr.type = ARGUS_MAR | ARGUS_CISCO_NETFLOW;
argus.ahdr.length = sizeof (argus);
argus.ahdr.cause = ARGUS_START;
@@ -2549,15 +2549,15 @@ ArgusGetServerSocket (struct ARGUS_INPUT
input->major_version = argus.argus_mar.major_version;
input->minor_version = argus.argus_mar.minor_version;
- bcopy ((char *) &argus, (char *)&input->ArgusInitCon, sizeof (argus));
- bcopy ((char *) &argus, (char *) ArgusOriginal, sizeof(argus));
+ memmove ((char *)&input->ArgusInitCon, (char *) &argus, sizeof (argus));
+ memmove ((char *) ArgusOriginal, (char *) &argus, sizeof(argus));
ArgusInput = input;
} else
ArgusLog (LOG_ERR, "ArgusGetServerSocket(0x%x) unknown type\n", input);
}
- bzero ((char *) &server, sizeof (server));
+ memset ((char *) &server, 0, sizeof (server));
if ((s = socket (AF_INET, type, 0)) >= 0) {
if (type == SOCK_DGRAM) {
@@ -2582,7 +2582,7 @@ ArgusGetServerSocket (struct ARGUS_INPUT
if ((hp = gethostbyaddr ((char *)&input->addr, sizeof (input->addr), AF_INET)) != NULL) {
input->hostname = strdup(hp->h_name);
- bcopy ((char *) hp->h_addr, (char *)&server.sin_addr, hp->h_length);
+ memmove ((char *)&server.sin_addr, (char *) hp->h_addr, hp->h_length);
server.sin_family = hp->h_addrtype;
server.sin_port = portnum;
#ifdef ARGUSDEBUG
@@ -2889,7 +2889,7 @@ check_time (struct ArgusRecord *ptr)
if (!explicit_date) {
tm = localtime_r((time_t *)&start->tv_sec, &tmbuf);
if (tm->tm_yday != starTimeFilter.tm_yday) {
- bcopy ((char *) tm, (char *) &tmbuf, sizeof (struct tm));
+ memmove ((char *) &tmbuf, (char *) tm, sizeof (struct tm));
if (check_time_format (&tmbuf, timearg))
ArgusLog (LOG_ERR, "time syntax error %s\n", timearg);
}
@@ -2926,7 +2926,7 @@ parseUserDataArg (char **arg, char *args
int retn = -1;
char buf[64], *ptr = buf;
- bzero (buf, 64);
+ memset (buf, 0, 64);
strcpy (buf, *arg);
ptr += strlen (buf);
@@ -2992,7 +2992,7 @@ parseTimeArg ( char **arg, char *args[],
int retn = -1;
char buf[64], *ptr = buf;
- bzero (buf, 64);
+ memset (buf, 0, 64);
strcpy (buf, *arg);
ptr += strlen (buf);
if ((ptr = strchr(*arg, '-')) && (*(ptr + 1) != '\0')) {
@@ -3054,7 +3054,7 @@ check_time_format (struct tm *tm, char *
} else {
if ((retn = parseTime (&starTimeFilter, tm, buf)) > 0) {
- bcopy ((char *)&starTimeFilter, (char *)&lastTimeFilter, sizeof(struct tm));
+ memmove ((char *)&lastTimeFilter, (char *)&starTimeFilter, sizeof(struct tm));
switch (retn) {
case ARGUS_YEAR: lastTimeFilter.tm_year++; break;
case ARGUS_MONTH: lastTimeFilter.tm_mon++; break;
@@ -3091,7 +3091,7 @@ parseTime (struct tm *tm, struct tm *ctm
/*[[[yyyy/]mm/]dd].]hh[:mm[:ss]]*/
- bcopy ((u_char *) ctm, (u_char *) tm, sizeof (struct tm));
+ memmove ((u_char *) tm, (u_char *) ctm, sizeof (struct tm));
if ((hptr = strchr (str, '.')) != NULL) {
*hptr++ = '\0';
diff -rup argus-3.0.0.rc.34.orig/common/argus_util.c argus-3.0.0.rc.34/common/argus_util.c
--- argus-3.0.0.rc.34.orig/common/argus_util.c 2006-10-02 17:23:44.000000000 +0200
+++ argus-3.0.0.rc.34/common/argus_util.c 2006-12-20 17:02:40.000000000 +0100
@@ -540,12 +540,12 @@ ArgusNtoH (struct ArgusRecord *argus)
u_int32_t value;
stat->n = ntohl(stat->n);
stat->minval = ntohl(stat->minval);
- bcopy((char *)&stat->meanval, (char *)&value, sizeof(value));
+ memmove((char *)&value, (char *)&stat->meanval, sizeof(value));
value = ntohl(value);
- bcopy((char *)&value, (char *)&stat->meanval, sizeof(value));
- bcopy((char *)&stat->stdev, (char *)&value, sizeof(value));
+ memmove((char *)&stat->meanval, (char *)&value, sizeof(value));
+ memmove((char *)&value, (char *)&stat->stdev, sizeof(value));
value = ntohl(value);
- bcopy((char *)&value, (char *)&stat->stdev, sizeof(value));
+ memmove((char *)&stat->stdev, (char *)&value, sizeof(value));
stat->maxval = ntohl(stat->maxval);
stat++;
@@ -946,12 +946,12 @@ ArgusHtoN (struct ArgusRecord *argus)
u_int32_t value;
stat->n = htonl(stat->n);
stat->minval = htonl(stat->minval);
- bcopy((char *)&stat->meanval, (char *)&value, sizeof(value));
+ memmove((char *)&value, (char *)&stat->meanval, sizeof(value));
value = htonl(value);
- bcopy((char *)&value, (char *)&stat->meanval, sizeof(value));
- bcopy((char *)&stat->stdev, (char *)&value, sizeof(value));
+ memmove((char *)&stat->meanval, (char *)&value, sizeof(value));
+ memmove((char *)&value, (char *)&stat->stdev, sizeof(value));
value = htonl(value);
- bcopy((char *)&value, (char *)&stat->stdev, sizeof(value));
+ memmove((char *)&stat->stdev, (char *)&value, sizeof(value));
stat->maxval = htonl(stat->maxval);
stat++;
len -= sizeof (*stat);
@@ -1535,8 +1535,8 @@ print_time(struct timeval *tvp)
char *retn = ArgusPrintTimeBuf, *ptr;
struct tm *tm, tmbuf;
- bzero (timeZoneBuf, sizeof(timeZoneBuf));
- bzero (ArgusPrintTimeBuf, sizeof(ArgusPrintTimeBuf));
+ memset (timeZoneBuf, 0, sizeof(timeZoneBuf));
+ memset (ArgusPrintTimeBuf, 0, sizeof(ArgusPrintTimeBuf));
if ((tm = localtime_r ((time_t *)&tvp->tv_sec, &tmbuf)) != NULL) {
if (uflag)
@@ -1614,8 +1614,8 @@ lookup_nsap(struct ArgusParserStruct *pa
tp->e_addr1 == j &&
tp->e_addr2 == k &&
tp->e_nsap[0] == nlen &&
- bcmp((char *)&(nsap[1]),
- (char *)&(tp->e_nsap[1]), nlen) == 0)
+ ( nlen == 0 ? 0 : memcmp((char *)&(nsap[1]),
+ (char *)&(tp->e_nsap[1]), nlen) == 0))
return tp;
else
tp = tp->e_nxt;
@@ -1623,7 +1623,7 @@ lookup_nsap(struct ArgusParserStruct *pa
tp->e_addr1 = j;
tp->e_addr2 = k;
tp->e_nsap = (u_char *) calloc(1, nlen + 1);
- bcopy(nsap, tp->e_nsap, nlen + 1);
+ memmove(tp->e_nsap, nsap, nlen + 1);
tp->e_nxt = (struct enamemem *)calloc(1, sizeof(*tp));
return tp;
@@ -1696,7 +1696,7 @@ ArgusInitEprotoarray(struct ArgusParserS
{
struct ArgusEtherTypeStruct *p = argus_ethertype_names;
- bzero ((char *)parser->argus_eproto_db, sizeof (parser->argus_eproto_db));
+ memset ((char *)parser->argus_eproto_db, 0, sizeof (parser->argus_eproto_db));
while (p->range != NULL) {
int i, start, end;
@@ -2209,7 +2209,7 @@ etheraddr_string(u_char *ep)
char *cp = etheraddrbuf;
u_int i, j;
- bzero (cp, sizeof(etheraddrbuf));
+ memset (cp, 0, sizeof(etheraddrbuf));
if ((j = *ep >> 4) != 0)
*cp++ = hex[j];
*cp++ = hex[*ep++ & 0xf];