Lines Matching refs:proto
20 enum qeth_prot_versions proto, u8 *addr) in qeth_l3_string_to_ipaddr() argument
24 if ((proto == QETH_PROT_IPV4 && !in4_pton(buf, -1, addr, -1, &end)) || in qeth_l3_string_to_ipaddr()
25 (proto == QETH_PROT_IPV6 && !in6_pton(buf, -1, addr, -1, &end))) in qeth_l3_string_to_ipaddr()
367 enum qeth_prot_versions proto) in qeth_l3_dev_ipato_add_show() argument
377 if (ipatoe->proto != proto) in qeth_l3_dev_ipato_add_show()
380 entry_len = qeth_l3_ipaddr_to_string(proto, ipatoe->addr, in qeth_l3_dev_ipato_add_show()
386 entry_len += 1 + ((proto == QETH_PROT_IPV4) ? 2 : 3); in qeth_l3_dev_ipato_add_show()
409 static int qeth_l3_parse_ipatoe(const char *buf, enum qeth_prot_versions proto, in qeth_l3_parse_ipatoe() argument
422 rc = qeth_l3_string_to_ipaddr(buf, proto, addr); in qeth_l3_parse_ipatoe()
430 if (*mask_bits > ((proto == QETH_PROT_IPV4) ? 32 : 128)) in qeth_l3_parse_ipatoe()
437 struct qeth_card *card, enum qeth_prot_versions proto) in qeth_l3_dev_ipato_add_store() argument
444 rc = qeth_l3_parse_ipatoe(buf, proto, addr, &mask_bits); in qeth_l3_dev_ipato_add_store()
452 ipatoe->proto = proto; in qeth_l3_dev_ipato_add_store()
453 memcpy(ipatoe->addr, addr, (proto == QETH_PROT_IPV4) ? 4 : 16); in qeth_l3_dev_ipato_add_store()
476 struct qeth_card *card, enum qeth_prot_versions proto) in qeth_l3_dev_ipato_del_store() argument
482 rc = qeth_l3_parse_ipatoe(buf, proto, addr, &mask_bits); in qeth_l3_dev_ipato_del_store()
484 rc = qeth_l3_del_ipato_entry(card, proto, addr, mask_bits); in qeth_l3_dev_ipato_del_store()
585 enum qeth_prot_versions proto, in qeth_l3_dev_ip_add_show() argument
598 if (ipaddr->proto != proto || ipaddr->type != type) in qeth_l3_dev_ip_add_show()
601 entry_len = qeth_l3_ipaddr_to_string(proto, (u8 *)&ipaddr->u, in qeth_l3_dev_ip_add_show()
629 size_t count, enum qeth_prot_versions proto) in qeth_l3_vipa_store() argument
635 rc = qeth_l3_string_to_ipaddr(buf, proto, addr); in qeth_l3_vipa_store()
638 QETH_IP_TYPE_VIPA, proto); in qeth_l3_vipa_store()
709 static int qeth_l3_parse_rxipe(const char *buf, enum qeth_prot_versions proto, in qeth_l3_parse_rxipe() argument
715 if (qeth_l3_string_to_ipaddr(buf, proto, addr)) { in qeth_l3_parse_rxipe()
718 if (proto == QETH_PROT_IPV4) { in qeth_l3_parse_rxipe()
724 } else if (proto == QETH_PROT_IPV6) { in qeth_l3_parse_rxipe()
736 size_t count, enum qeth_prot_versions proto) in qeth_l3_rxip_store() argument
742 rc = qeth_l3_parse_rxipe(buf, proto, addr); in qeth_l3_rxip_store()
745 QETH_IP_TYPE_RXIP, proto); in qeth_l3_rxip_store()