X-Git-Url: https://gapil.gnulinux.it/gitweb/?p=gapil.git;a=blobdiff_plain;f=socket.tex;h=0efc4fd8ca2832ad76223df43bb939a82bfef5e3;hp=e5fc8ae8d5fdbd5ef53514e821e332988255a0ea;hb=f0a88aa3fbf538f45accfaf6bd039263a781b1d0;hpb=d58b732f24797c3c17ab1cc8d8aa85ec04df62ed diff --git a/socket.tex b/socket.tex index e5fc8ae..0efc4fd 100644 --- a/socket.tex +++ b/socket.tex @@ -165,21 +165,22 @@ protocolli disponibili sono riportate in \ntab. \begin{table}[htb] \footnotesize \centering - \begin{tabular}[c]{lll} + \begin{tabular}[c]{|l|l|l|} \hline - \textsl{Nome} & \textsl{Utilizzo} &\textsl{Man page} \\ + \textbf{Nome} & \textbf{Utilizzo} &\textbf{Man page} \\ \hline \hline - PF\_UNIX,PF\_LOCAL & Local communication & unix(7) \\ - PF\_INET & IPv4 Internet protocols & ip(7) \\ - PF\_INET6 & IPv6 Internet protocols & \\ - PF\_IPX & IPX - Novell protocols & \\ - PF\_NETLINK & Kernel user interface device & netlink(7) \\ - PF\_X25 & ITU-T X.25 / ISO-8208 protocol & x25(7) \\ - PF\_AX25 & Amateur radio AX.25 protocol & \\ - PF\_ATMPVC & Access to raw ATM PVCs & \\ - PF\_APPLETALK & Appletalk & ddp(7) \\ - PF\_PACKET & Low level packet interface & packet(7) \\ + \macro{PF\_UNIX}, + \macro{PF\_LOCAL} & Local communication & unix(7) \\ + \macro{PF\_INET} & IPv4 Internet protocols & ip(7) \\ + \macro{PF\_INET6} & IPv6 Internet protocols & \\ + \macro{PF\_IPX} & IPX - Novell protocols & \\ + \macro{PF\_NETLINK}& Kernel user interface device & netlink(7) \\ + \macro{PF\_X25} & ITU-T X.25 / ISO-8208 protocol & x25(7) \\ + \macro{PF\_AX25} & Amateur radio AX.25 protocol & \\ + \macro{PF\_ATMPVC} & Access to raw ATM PVCs & \\ + \macro{PF\_APPLETALK}& Appletalk & ddp(7) \\ + \macro{PF\_PACKET} & Low level packet interface & packet(7) \\ \hline \end{tabular} \caption{Famiglie di protocolli definiti in Linux} @@ -332,21 +333,21 @@ definiti; la struttura \multicolumn{1}{|c|}{Header} \\ \hline \hline - \texttt{int8\_t} & intero a 8 bit con segno & \texttt{sys/types.h}\\ - \texttt{uint8\_t} & intero a 8 bit senza segno & \texttt{sys/types.h}\\ - \texttt{int16\_t} & intero a 16 bit con segno & \texttt{sys/types.h}\\ - \texttt{uint16\_t} & intero a 16 bit senza segno& \texttt{sys/types.h}\\ - \texttt{int32\_t} & intero a 32 bit con segno & \texttt{sys/types.h}\\ - \texttt{uint32\_t} & intero a 32 bit senza segno& \texttt{sys/types.h}\\ + \type{int8\_t} & intero a 8 bit con segno & \file{sys/types.h}\\ + \type{uint8\_t} & intero a 8 bit senza segno & \file{sys/types.h}\\ + \type{int16\_t} & intero a 16 bit con segno & \file{sys/types.h}\\ + \type{uint16\_t} & intero a 16 bit senza segno& \file{sys/types.h}\\ + \type{int32\_t} & intero a 32 bit con segno & \file{sys/types.h}\\ + \type{uint32\_t} & intero a 32 bit senza segno& \file{sys/types.h}\\ \hline - \texttt{sa\_family\_t} & famiglia degli indirizzi& \texttt{sys/socket.h}\\ - \texttt{socklen\_t} & lunghezza (\texttt{uint32\_t}) dell'indirizzo di - un socket& \texttt{sys/socket.h}\\ + \type{sa\_family\_t} & famiglia degli indirizzi& \file{sys/socket.h}\\ + \type{socklen\_t} & lunghezza (\type{uint32\_t}) dell'indirizzo di + un socket& \type{sys/socket.h}\\ \hline - \texttt{in\_addr\_t} & indirizzo IPv4 (\texttt{uint32\_t}) & - \texttt{netinet/in.h}\\ - \texttt{in\_port\_t} & porta TCP o UDP (\texttt{uint16\_t})& - \texttt{netinet/in.h}\\ + \type{in\_addr\_t} & indirizzo IPv4 (\file{uint32\_t}) & + \type{netinet/in.h}\\ + \type{in\_port\_t} & porta TCP o UDP (\file{uint16\_t})& + \type{netinet/in.h}\\ \hline \end{tabular} \caption{Tipi di dati usati nelle strutture degli indirizzi, secondo quanto @@ -669,10 +670,10 @@ il tipo di conversione effettuata e stanno per \textit{presentation} e % \end{figure} -Entrambe le funzioni accettano l'argomento \texttt{af} che indica il tipo di -indirizzo e può essere \texttt{AF\_INET} o \texttt{AF\_INET6}. Se la famiglia -indicata non è valida entrambe le funzioni settano la variabile \texttt{errno} -al valore \texttt{EAFNOSUPPORT}. I prototipi delle suddette funzioni sono i +Entrambe le funzioni accettano l'argomento \param{af} che indica il tipo di +indirizzo e può essere \macro{AF\_INET} o \macro{AF\_INET6}. Se la famiglia +indicata non è valida entrambe le funzioni settano la variabile \var{errno} +al valore \macro{EAFNOSUPPORT}. I prototipi delle suddette funzioni sono i seguenti: \begin{prototype}{sys/socket.h} {int inet\_pton(int af, const char *src, void *addr\_ptr)} Converte la