Displaying 1 result from an estimated 1 matches for "d_length".
Did you mean:
_length
2004 Sep 22
2
Grandstream bin cfg.txt generator
...}
close F;
$a_body .='gnkey=0b82';
# add an extra byte to make the body even (bytewise)
$a_body .= "\0" if ((length($a_body) % 2) ne 0);
# add an extra word ( = two bytes) to make the body even (wordwise)
$a_body .= "\0\0" if ((length($a_body) % 4) ne 0);
# generate a d_length (length of the complete message, counting words, in dec)
# ( header is always 8 words lang ) + ( body in ascii (bytes) / 2 = in words )
my $d_length = 8 + (length($a_body)/2);
# make that a binary dword
my $b_length = pack("N", $d_length);
# generate a checksum
my $d_checksum;
foreach (...