🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #15792

Re: Mx lookup with res_query

#15792
From: Tom Michiels
Date: Thu, 17 Aug 2000 00:00
17 lines
1384 bytes
Mikael Chambon <quanta@akasha.cronos.org> wrote:
> HEllo, I am trying to do a MX lookup in C (under linux RH6.2),
> in order to do it I use the res_query function that should do the job.

> int res_query(const char *dname, int class, int type,
>               unsigned char *answer, int anslen);

> The problem is that I can't find any information about the "type",
> It should be there that I write MX. But what is the proper Integer that I
> should write to do a MX lookup ??  If someone has some informations ...

Try /usr/include/arpa/nameser.h for the class and type constants.

Tom

-- 
May the source be with you!
Technical Details
Message-ID: <966517573.839219@marvin>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8ngfhd$obc$5@news5.isdnet.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fcea4,2789057006640dee
X-Google-Attributes: gidfcea4,public
From: Tom Michiels <tomm@cs.kuleuven.ac.be>
Subject: Re: Mx lookup with res_query
Date: 2000/08/17
Message-ID: <966517573.839219@marvin>
X-Deja-AN: 659320007
Cache-Post-Path: marvin!unknown@godard.cs.kuleuven.ac.be
References: <8ngfhd$obc$5@news5.isdnet.net>
X-Complaints-To: abuse@belnet.be
X-Trace: naxos.belnet.be 966517574 29494 134.58.127.3 (17 Aug 2000 13:06:14 GMT)
Organization: BELNET
X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/)
User-Agent: tin/pre-1.4-981002 ("Phobia") (UNIX) (Linux/2.2.16 (i586))
NNTP-Posting-Date: Thu, 17 Aug 2000 13:06:14 +0000 (UTC)
Newsgroups: be.comp.programming