Lines Matching refs:usvc
2656 static void ip_vs_copy_usvc_compat(struct ip_vs_service_user_kern *usvc, in ip_vs_copy_usvc_compat() argument
2659 memset(usvc, 0, sizeof(*usvc)); in ip_vs_copy_usvc_compat()
2661 usvc->af = AF_INET; in ip_vs_copy_usvc_compat()
2662 usvc->protocol = usvc_compat->protocol; in ip_vs_copy_usvc_compat()
2663 usvc->addr.ip = usvc_compat->addr; in ip_vs_copy_usvc_compat()
2664 usvc->port = usvc_compat->port; in ip_vs_copy_usvc_compat()
2665 usvc->fwmark = usvc_compat->fwmark; in ip_vs_copy_usvc_compat()
2668 usvc->sched_name = usvc_compat->sched_name; in ip_vs_copy_usvc_compat()
2670 usvc->flags = usvc_compat->flags; in ip_vs_copy_usvc_compat()
2671 usvc->timeout = usvc_compat->timeout; in ip_vs_copy_usvc_compat()
2672 usvc->netmask = usvc_compat->netmask; in ip_vs_copy_usvc_compat()
2697 struct ip_vs_service_user_kern usvc; in do_ip_vs_set_ctl() local
2759 ip_vs_copy_usvc_compat(&usvc, usvc_compat); in do_ip_vs_set_ctl()
2764 if (!usvc.fwmark && !usvc.addr.ip && !usvc.port) { in do_ip_vs_set_ctl()
2771 strnlen(usvc.sched_name, IP_VS_SCHEDNAME_MAXLEN) == in do_ip_vs_set_ctl()
2778 if (usvc.protocol != IPPROTO_TCP && usvc.protocol != IPPROTO_UDP && in do_ip_vs_set_ctl()
2779 usvc.protocol != IPPROTO_SCTP) { in do_ip_vs_set_ctl()
2781 usvc.protocol, &usvc.addr.ip, in do_ip_vs_set_ctl()
2782 ntohs(usvc.port)); in do_ip_vs_set_ctl()
2789 if (usvc.fwmark == 0) in do_ip_vs_set_ctl()
2790 svc = __ip_vs_service_find(ipvs, usvc.af, usvc.protocol, in do_ip_vs_set_ctl()
2791 &usvc.addr, usvc.port); in do_ip_vs_set_ctl()
2793 svc = __ip_vs_svc_fwm_find(ipvs, usvc.af, usvc.fwmark); in do_ip_vs_set_ctl()
2797 && (svc == NULL || svc->protocol != usvc.protocol)) { in do_ip_vs_set_ctl()
2807 ret = ip_vs_add_service(ipvs, &usvc, &svc); in do_ip_vs_set_ctl()
2810 ret = ip_vs_edit_service(svc, &usvc); in do_ip_vs_set_ctl()
3440 struct ip_vs_service_user_kern *usvc, in ip_vs_genl_parse_service() argument
3462 memset(usvc, 0, sizeof(*usvc)); in ip_vs_genl_parse_service()
3464 usvc->af = nla_get_u16(nla_af); in ip_vs_genl_parse_service()
3465 if (!ip_vs_is_af_valid(usvc->af)) in ip_vs_genl_parse_service()
3469 usvc->protocol = IPPROTO_TCP; in ip_vs_genl_parse_service()
3470 usvc->fwmark = nla_get_u32(nla_fwmark); in ip_vs_genl_parse_service()
3472 usvc->protocol = nla_get_u16(nla_protocol); in ip_vs_genl_parse_service()
3473 nla_memcpy(&usvc->addr, nla_addr, sizeof(usvc->addr)); in ip_vs_genl_parse_service()
3474 usvc->port = nla_get_be16(nla_port); in ip_vs_genl_parse_service()
3475 usvc->fwmark = 0; in ip_vs_genl_parse_service()
3479 if (usvc->fwmark) in ip_vs_genl_parse_service()
3480 svc = __ip_vs_svc_fwm_find(ipvs, usvc->af, usvc->fwmark); in ip_vs_genl_parse_service()
3482 svc = __ip_vs_service_find(ipvs, usvc->af, usvc->protocol, in ip_vs_genl_parse_service()
3483 &usvc->addr, usvc->port); in ip_vs_genl_parse_service()
3506 usvc->flags = svc->flags; in ip_vs_genl_parse_service()
3509 usvc->flags = (usvc->flags & ~flags.mask) | in ip_vs_genl_parse_service()
3511 usvc->sched_name = nla_data(nla_sched); in ip_vs_genl_parse_service()
3512 usvc->pe_name = nla_pe ? nla_data(nla_pe) : NULL; in ip_vs_genl_parse_service()
3513 usvc->timeout = nla_get_u32(nla_timeout); in ip_vs_genl_parse_service()
3514 usvc->netmask = nla_get_be32(nla_netmask); in ip_vs_genl_parse_service()
3523 struct ip_vs_service_user_kern usvc; in ip_vs_genl_find_service() local
3527 ret = ip_vs_genl_parse_service(ipvs, &usvc, nla, false, &svc); in ip_vs_genl_find_service()
3914 struct ip_vs_service_user_kern usvc; in ip_vs_genl_set_cmd() local
3942 ret = ip_vs_genl_parse_service(ipvs, &usvc, in ip_vs_genl_set_cmd()
4006 ret = ip_vs_add_service(ipvs, &usvc, &svc); in ip_vs_genl_set_cmd()
4011 ret = ip_vs_edit_service(svc, &usvc); in ip_vs_genl_set_cmd()