def srv_name(svc, proto='tcp', domain=None):
    '''
    Generate SRV record name
    :param svc: ldap, 389 etc
    :param proto: tcp, udp, sctp etc.
    :param domain: name to append
    :return:
    '''
    proto = RFC.validate(proto, RFC.SRV_PROTO)
    if isinstance(svc, int) or svc.isdigit():
        svc = _to_port(svc)

    if domain:
        domain = '.' + domain
    return '_{0}._{1}{2}'.format(svc, proto, domain)
def srv_name ( svc , proto = 'tcp' , domain = None ) : proto = RFC . validate ( proto , RFC . SRV_PROTO ) if isinstance ( svc , int ) or svc . isdigit ( ) : svc = _to_port ( svc ) if domain : domain = '.' + domain return '_{0}._{1}{2}' . format ( svc , proto , domain )
Generate SRV record name
    :param svc: ldap, 389 etc
    :param proto: tcp, udp, sctp etc.
    :param domain: name to append
    :return: