Lines Matching defs:hinfo
156 struct seg6_hmac_info *hinfo;
181 hinfo = seg6_hmac_info_lookup(net, hmackeyid);
199 if (hinfo) {
207 hinfo = kzalloc(sizeof(*hinfo), GFP_KERNEL);
208 if (!hinfo) {
213 memcpy(hinfo->secret, secret, slen);
214 hinfo->slen = slen;
215 hinfo->alg_id = algid;
216 hinfo->hmackeyid = hmackeyid;
218 err = seg6_hmac_info_add(net, hmackeyid, hinfo);
220 kfree(hinfo);
301 static int __seg6_hmac_fill_info(struct seg6_hmac_info *hinfo,
304 if (nla_put_u32(msg, SEG6_ATTR_HMACKEYID, hinfo->hmackeyid) ||
305 nla_put_u8(msg, SEG6_ATTR_SECRETLEN, hinfo->slen) ||
306 nla_put(msg, SEG6_ATTR_SECRET, hinfo->slen, hinfo->secret) ||
307 nla_put_u8(msg, SEG6_ATTR_ALGID, hinfo->alg_id))
313 static int __seg6_genl_dumphmac_element(struct seg6_hmac_info *hinfo,
323 if (__seg6_hmac_fill_info(hinfo, skb) < 0)
370 struct seg6_hmac_info *hinfo;
376 hinfo = rhashtable_walk_next(iter);
378 if (IS_ERR(hinfo)) {
379 if (PTR_ERR(hinfo) == -EAGAIN)
381 ret = PTR_ERR(hinfo);
383 } else if (!hinfo) {
387 ret = __seg6_genl_dumphmac_element(hinfo,