Lines Matching defs:hinfo
97 struct seg6_hmac_info *hinfo;
122 hinfo = seg6_hmac_info_lookup(net, hmackeyid);
125 if (!hinfo)
143 if (hinfo) {
151 hinfo = kzalloc(sizeof(*hinfo), GFP_KERNEL);
152 if (!hinfo) {
157 memcpy(hinfo->secret, secret, slen);
158 hinfo->slen = slen;
159 hinfo->alg_id = algid;
160 hinfo->hmackeyid = hmackeyid;
162 err = seg6_hmac_info_add(net, hmackeyid, hinfo);
164 kfree(hinfo);
245 static int __seg6_hmac_fill_info(struct seg6_hmac_info *hinfo,
248 if (nla_put_u32(msg, SEG6_ATTR_HMACKEYID, hinfo->hmackeyid) ||
249 nla_put_u8(msg, SEG6_ATTR_SECRETLEN, hinfo->slen) ||
250 nla_put(msg, SEG6_ATTR_SECRET, hinfo->slen, hinfo->secret) ||
251 nla_put_u8(msg, SEG6_ATTR_ALGID, hinfo->alg_id))
257 static int __seg6_genl_dumphmac_element(struct seg6_hmac_info *hinfo,
267 if (__seg6_hmac_fill_info(hinfo, skb) < 0)
314 struct seg6_hmac_info *hinfo;
320 hinfo = rhashtable_walk_next(iter);
322 if (IS_ERR(hinfo)) {
323 if (PTR_ERR(hinfo) == -EAGAIN)
325 ret = PTR_ERR(hinfo);
327 } else if (!hinfo) {
331 ret = __seg6_genl_dumphmac_element(hinfo,