X-Git-Url: https://gapil.gnulinux.it/gitweb/?a=blobdiff_plain;f=sockadv.tex;h=c955454637428e0e2577a1962c149d2497db0ecc;hb=22e01eeebd2d386a8a992cba0fdaf2d73f5ff217;hp=9297e1cfcba1e202a1d1ba035262b7ecd4606d59;hpb=b51bcef6bcf8c8622107b8ab8a22626dbdf6ba96;p=gapil.git diff --git a/sockadv.tex b/sockadv.tex index 9297e1c..c955454 100644 --- a/sockadv.tex +++ b/sockadv.tex @@ -1,9 +1,9 @@ %% sockadv.tex %% -%% Copyright (C) 2004 Simone Piccardi. Permission is granted to +%% Copyright (C) 2004-2005 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the -%% Free Software Foundation; with the Invariant Sections being "Prefazione", +%% Free Software Foundation; with the Invariant Sections being "Un preambolo", %% with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the %% license is included in the section entitled "GNU Free Documentation %% License". @@ -26,6 +26,67 @@ controllare le funzionalit disponibili con i vari tipi di socket. + + +\subsection{La fuzioni \func{sendmsg} e \func{recvmsg}} +\label{sec:net_sendmsg} + + +Finora abbiamo trattato delle funzioni che permettono di inviare dati sul +socket in forma semplificata. Se infatti si devono semplicemente ... + + + +\subsection{I messaggi ancillari} +\label{sec:net_ancillary_data} + + + + +Quanto è stata attivata l'opzione \const{IP\_RECVERR} il kernel attiva per il +socket una speciale coda su cui vengono inviati tutti gli errori riscontrati. +Questi possono essere riletti usando il flag \const{MSG\_ERRQUEUE}, nel qual +caso sarà passato come messaggio ancillare una struttura di tipo +\struct{sock\_extended\_err} illustrata in +fig.~\ref{fig:sock_extended_err_struct}. + + +\begin{figure}[!htb] + \footnotesize \centering + \begin{minipage}[c]{15cm} + \includestruct{listati/sock_extended_err.h} + \end{minipage} + \caption{La struttura \structd{sock\_extended\_err} usata dall'opzione + \const{IP\_RECVERR} per ottenere le informazioni relative agli errori su + un socket.} + \label{fig:sock_extended_err_struct} +\end{figure} + + + + +\subsection{La gestione delle opzioni IP} +\label{sec:sock_IP_options} + + +Abbiamo visto in sez.~\ref{sec:sock_ipv4_options} come di possa usare +\func{setsockopt} con l'opzione \const{IP\_OPTIONS} per impostare le opzioni +IP associate per i pacchetti associati ad un socket. + + + + + + + + + + + + + + + \subsection{I dati \textit{out-of-band}} \label{sec:TCP_urgent_data}