Altre correzioni ortografiche.
[gapil.git] / sockadv.tex
1 %% sockadv.tex
2 %%
3 %% Copyright (C) 2004-2005 Simone Piccardi.  Permission is granted to
4 %% copy, distribute and/or modify this document under the terms of the GNU Free
5 %% Documentation License, Version 1.1 or any later version published by the
6 %% Free Software Foundation; with the Invariant Sections being "Un preambolo",
7 %% with no Front-Cover Texts, and with no Back-Cover Texts.  A copy of the
8 %% license is included in the section entitled "GNU Free Documentation
9 %% License".
10 %%
11 \chapter{Socket avanzati}
12 \label{cha:advanced_socket}
13
14
15 Esamineremo in questo capitolo le funzionalità più evolute della gestione dei
16 socket, le funzioni avanzate, la gestione dei dati urgenti e
17 \textit{out-of-band} e dei messaggi ancillari, come l'uso come l'uso del I/O
18 multiplexing (vedi sez.~\ref{sec:file_multiplexing}) con i socket.
19
20
21 \section{Le funzioni di I/O avanzate}
22 \label{sec:sock_advanced_IO}
23
24 Tratteremo in questa sezione le funzioni di I/O più avanzate che permettono di
25 controllare le funzionalità specifiche della comunicazione dei dati che sono
26 disponibili con i vari tipi di socket.
27
28
29 \subsection{La funzioni \func{sendmsg} e \func{recvmsg}}
30 \label{sec:net_sendmsg}
31
32 Finora abbiamo trattato delle funzioni che permettono di inviare dati sul
33 socket in forma semplificata. Se infatti si devono semplicemente ...
34
35
36
37 \subsection{I messaggi ancillari}
38 \label{sec:net_ancillary_data}
39
40 Quanto è stata attivata l'opzione \const{IP\_RECVERR} il kernel attiva per il
41 socket una speciale coda su cui vengono inviati tutti gli errori riscontrati.
42 Questi possono essere riletti usando il flag \const{MSG\_ERRQUEUE}, nel qual
43 caso sarà passato come messaggio ancillare una struttura di tipo
44 \struct{sock\_extended\_err} illustrata in
45 fig.~\ref{fig:sock_extended_err_struct}.
46
47
48 \begin{figure}[!htb]
49   \footnotesize \centering
50   \begin{minipage}[c]{15cm}
51     \includestruct{listati/sock_extended_err.h}
52   \end{minipage}
53   \caption{La struttura \structd{sock\_extended\_err} usata dall'opzione
54     \const{IP\_RECVERR} per ottenere le informazioni relative agli errori su
55     un socket.}
56   \label{fig:sock_extended_err_struct}
57 \end{figure}
58
59
60
61
62 \subsection{I dati \textit{out-of-band}}
63 \label{sec:TCP_urgent_data}
64
65 Una caratteristica speciale dei socket TCP è quella della presenza dei
66 cosiddetti dati \textit{out-of-band} ...
67
68
69 \section{L'uso dell'I/O non bloccante}
70 \label{sec:sock_noblok_IO}
71
72 Tratteremo in questa sezione le modalità avanzate che permettono di utilizzare
73 i socket con una comunicazione non bloccante, in modo da 
74
75
76
77
78
79 \subsection{La gestione delle opzioni IP}  
80 \label{sec:sock_IP_options}  
81
82 Abbiamo visto in sez.~\ref{sec:sock_ipv4_options} come di possa usare  
83 \func{setsockopt} con l'opzione \const{IP\_OPTIONS} per impostare le opzioni  
84 IP associate per i pacchetti associati ad un socket.  Vedremo qui il
85 significato di tali opzioni e le modalità con cui esse possono essere
86 utilizzate ed impostate.
87
88
89 %%% Local Variables: 
90 %%% mode: latex
91 %%% TeX-master: "gapil"
92 %%% End: 
93
94 % LocalWords:  socket of multiplexing sez sendmsg recvmsg RECVERR kernel MSG
95 % LocalWords:  ERRQUEUE sock err fig TCP dell'I setsockopt OPTIONS