local_addr, dest != null ? dest : "<all>", msg.getLength(), num_frags, frag_size);
}
long frag_id=getNextId(); // used as a seqno
for(int i=0; i < num_frags; i++) {
Range r=fragments.get(i);
// don't copy the buffer, only src, dest and headers. Only copy the headers one time !
Message frag_msg=msg.copy(false, i == 0);
frag_msg.setBuffer(buffer, (int)r.low, (int)r.high);
FragHeader hdr=new FragHeader(frag_id, i, num_frags);
frag_msg.putHeader(this.id, hdr);