Altra roba, res_query.
[gapil.git] / sockctrl.tex
index 1b99e53285a8c279410038e81450cd0e80414aa6..62989d4a2deaa2922461f33ff4c9e966f0a82500 100644 (file)
@@ -269,8 +269,6 @@ ad esempio il valore di default dato dalla costante \const{RES\_DEFAULT} 
 definito come: 
 \includecodesnip{listati/resolv_option_def.c}
 
 definito come: 
 \includecodesnip{listati/resolv_option_def.c}
 
-
-
 \begin{table}[htb]
   \centering
   \footnotesize
 \begin{table}[htb]
   \centering
   \footnotesize
@@ -320,6 +318,23 @@ definito come:
   \label{tab:resolver_option}
 \end{table}
 
   \label{tab:resolver_option}
 \end{table}
 
+La funzione di richiesta principale è \funcd{res\_query}, che serve ad
+eseguire una richiesta ad un server DNS per un nome a dominio completamente
+specificato (quello che si chiama FQDN, \textit{Fully Qualified Domain Name});
+il suo prototipo è:
+
+\begin{functions}
+\headdecl{netinet/in.h}
+\headdecl{arpa/nameser.h}
+\headdecl{resolv.h}
+\funcdecl{int res\_query(const char *dname, int class, int type,
+              unsigned char *answer, int anslen)}
+
+  Esegue una interrogazione al DNS.
+
+\bodydesc{La funzione restituisce 0 in caso di successo e -1 in caso di
+  errore.}
+\end{functions}
 
 
 Per quanto ci interessa i tipi di \textit{resource record} che vengono
 
 
 Per quanto ci interessa i tipi di \textit{resource record} che vengono