Net-MDNS-Client

 view release on metacpan or  search on metacpan

Client.xs  view on Meta::CPAN

mdnsda
mdnsc_get_a_result(query_type, query_string)
	char *	query_string
	char *	query_type

	INIT:
		mdnsda r;
		struct in_addr in;
		char * t;

	PPCODE:
		r = mdnsc_get_a_result(query_type, query_string);
		if ( GIMME_V == G_VOID )
			{ XSRETURN_UNDEF;}
		if (r)
			{
				if ( GIMME_V == G_SCALAR )
					{
						if (!strcmp("host by service", query_type))
                        				{
								int len; char u[513]; char * p;

const-xs.inc  view on Meta::CPAN

	dTARGET;
#endif
	STRLEN		len;
        int		type;
	IV		iv;
	/* NV		nv;	Uncomment this if you need to return NVs */
	/* const char	*pv;	Uncomment this if you need to return PVs */
    INPUT:
	SV *		sv;
        const char *	s = SvPV(sv, len);
    PPCODE:
        /* Change this to constant(aTHX_ s, len, &iv, &nv);
           if you need to return both NVs and IVs */
	type = constant(aTHX_ s, len, &iv);
      /* Return 1 or 2 items. First is error message, or undef if no error.
           Second, if present, is found value */
        switch (type) {
        case PERL_constant_NOTFOUND:
          sv = sv_2mortal(newSVpvf("%s is not a valid Net::MDNS::Client macro", s));
          PUSHs(sv);
          break;

fallback/const-xs.inc  view on Meta::CPAN

	dTARGET;
#endif
	STRLEN		len;
        int		type;
	IV		iv;
	/* NV		nv;	Uncomment this if you need to return NVs */
	/* const char	*pv;	Uncomment this if you need to return PVs */
    INPUT:
	SV *		sv;
        const char *	s = SvPV(sv, len);
    PPCODE:
        /* Change this to constant(aTHX_ s, len, &iv, &nv);
           if you need to return both NVs and IVs */
	type = constant(aTHX_ s, len, &iv);
      /* Return 1 or 2 items. First is error message, or undef if no error.
           Second, if present, is found value */
        switch (type) {
        case PERL_constant_NOTFOUND:
          sv = sv_2mortal(newSVpvf("%s is not a valid Net::MDNS::Client macro", s));
          PUSHs(sv);
          break;



( run in 1.216 second using v1.01-cache-2.11-cpan-5511b514fd6 )