Lines Matching refs:buf_len
1817 static int cipso_v4_genopt(unsigned char *buf, u32 buf_len, in cipso_v4_genopt() argument
1824 if (buf_len <= CIPSO_V4_HDR_LEN) in cipso_v4_genopt()
1832 memset(buf, 0, buf_len); in cipso_v4_genopt()
1838 buf_len - CIPSO_V4_HDR_LEN); in cipso_v4_genopt()
1844 buf_len - CIPSO_V4_HDR_LEN); in cipso_v4_genopt()
1850 buf_len - CIPSO_V4_HDR_LEN); in cipso_v4_genopt()
1856 buf_len - CIPSO_V4_HDR_LEN); in cipso_v4_genopt()
1892 u32 buf_len; in cipso_v4_sock_setattr() local
1908 buf_len = CIPSO_V4_OPT_LEN_MAX; in cipso_v4_sock_setattr()
1909 buf = kmalloc(buf_len, GFP_ATOMIC); in cipso_v4_sock_setattr()
1915 ret_val = cipso_v4_genopt(buf, buf_len, doi_def, secattr); in cipso_v4_sock_setattr()
1918 buf_len = ret_val; in cipso_v4_sock_setattr()
1924 opt_len = (buf_len + 3) & ~3; in cipso_v4_sock_setattr()
1930 memcpy(opt->opt.__data, buf, buf_len); in cipso_v4_sock_setattr()
1976 u32 buf_len; in cipso_v4_req_setattr() local
1984 buf_len = CIPSO_V4_OPT_LEN_MAX; in cipso_v4_req_setattr()
1985 buf = kmalloc(buf_len, GFP_ATOMIC); in cipso_v4_req_setattr()
1991 ret_val = cipso_v4_genopt(buf, buf_len, doi_def, secattr); in cipso_v4_req_setattr()
1994 buf_len = ret_val; in cipso_v4_req_setattr()
2000 opt_len = (buf_len + 3) & ~3; in cipso_v4_req_setattr()
2006 memcpy(opt->opt.__data, buf, buf_len); in cipso_v4_req_setattr()
2235 u32 buf_len = CIPSO_V4_OPT_LEN_MAX; in cipso_v4_skbuff_setattr() local
2239 ret_val = cipso_v4_genopt(buf, buf_len, doi_def, secattr); in cipso_v4_skbuff_setattr()
2242 buf_len = ret_val; in cipso_v4_skbuff_setattr()
2243 opt_len = (buf_len + 3) & ~3; in cipso_v4_skbuff_setattr()
2284 memcpy(iph + 1, buf, buf_len); in cipso_v4_skbuff_setattr()
2285 if (opt_len > buf_len) in cipso_v4_skbuff_setattr()
2286 memset((char *)(iph + 1) + buf_len, 0, opt_len - buf_len); in cipso_v4_skbuff_setattr()