Lines Matching refs:buf_len
723 static int calipso_genopt(unsigned char *buf, u32 start, u32 buf_len, in calipso_genopt() argument
735 if (buf_len <= start + pad + CALIPSO_HDR_LEN) in calipso_genopt()
747 buf_len - start - pad - len); in calipso_genopt()
912 unsigned int start, end, buf_len, pad, hop_len; in calipso_opt_insert() local
927 buf_len = hop_len + start - end + CALIPSO_OPT_LEN_MAX_WITH_PAD; in calipso_opt_insert()
928 new = kzalloc(buf_len, GFP_ATOMIC); in calipso_opt_insert()
934 ret_val = calipso_genopt((unsigned char *)new, start, buf_len, doi_def, in calipso_opt_insert()
941 buf_len = start + ret_val; in calipso_opt_insert()
943 pad = ((buf_len & 4) + (end & 7)) & 7; in calipso_opt_insert()
944 calipso_pad_write((unsigned char *)new, buf_len, pad); in calipso_opt_insert()
945 buf_len += pad; in calipso_opt_insert()
948 memcpy((char *)new + buf_len, (char *)hop + end, hop_len - end); in calipso_opt_insert()
949 buf_len += hop_len - end; in calipso_opt_insert()
952 new->hdrlen = buf_len / 8 - 1; in calipso_opt_insert()