no udp response on FreeBSD/arm

Vernon Schryver
Sun Jun 24 16:49:53 UTC 2012

> From: "Ronald Klop" <>

> Cdcc info works and the network traffic looks ok. So I do not see a  
> firewall issue.


> Wireshark (1.8) gives some interesting outcome. Here are the dump files.
> The first md5 sum is shifted 2 bytes in dump-arm.
> amd: 28:49:3c:d1:60:ac:70:13:16:df:e6:a7:d7:0c:4c:e4
> arm: 08:20:28:49:3c:d1:60:ac:70:13:16:df:e6:a7:d7:0c
> The length field of the checksum says 36 on arm and 18 on amd64. And the  
> arm value looks padded with 0's at the end.


Are you using current official DCC source from or ?
Have you modified any of it at all?
I assume (and hope) not, but experience demands that I ask.

This is the code in clntlib/ask.c that puts the checksums into the request:

	ck = rpt.r.cks;
	num_cks = 0;
	for (g = cks->sums; g <= &cks->sums[DCC_CK_TYPE_LAST]; ++g) {
		/* do not tell the DCC server about some checksums */
		if (!g->rpt2srvr)
		ck->len = sizeof(*ck);
		ck->type = g->type;
		ck->sum = g->sum;

These are the relevant definitions from include/dcc_proto.h

    typedef u_char DCC_CK_TYPE_B;
    typedef struct {
	u_char	hi, lo;
    typedef union {
	u_char b[16];
    } DCC_SUM;
    typedef struct {
	DCC_CK_TYPE_B type;
	u_char	len;			/* total length of this checksum */
	DCC_SUM	sum;
    } DCC_CK;

It can't be that sizeof(u_char)==2, because 1 byte fields 
such as the checksum length are using single bytes.

If it were an alignment or structure confusion, I'd expect 
the length to be rounded up to 20 or 24 instead of 36.

It would be interesting to see what the compiler thinks about
the sizes and alignments of the structure elements of cks->sums.

Vernon Schryver

More information about the DCC mailing list

Contact by mail or use the form.