declare hdr_bufp and hdr_loc as public