X-Git-Url: https://gapil.gnulinux.it/gitweb/?p=gapil.git;a=blobdiff_plain;f=othersock.tex;h=640f8b74cf809c848f2e42ea7c1de4ef39f6cff5;hp=439ccefcd55d92a940a308f87bc8464761b8806a;hb=0196c376e39fc18f8cd5e7fef47b61264f943faf;hpb=cebc759ef695405a69328538834883d9d470b06e diff --git a/othersock.tex b/othersock.tex index 439ccef..640f8b7 100644 --- a/othersock.tex +++ b/othersock.tex @@ -1,6 +1,6 @@ %% othersock.tex %% -%% Copyright (C) 2004-2006 Simone Piccardi. Permission is granted to +%% Copyright (C) 2004-2008 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 "Un preambolo", @@ -8,12 +8,13 @@ %% license is included in the section entitled "GNU Free Documentation %% License". %% + \chapter{Gli altri tipi di socket} \label{cha:other_socket} -Dopo aver trattato in cap.~\ref{cha:TCP_socket} i socket TCP, che costituiscono -l'esempio più comune dell'interfaccia dei socket, esamineremo in questo -capitolo gli altri tipi di socket, a partire dai socket UDP, e i socket +Dopo aver trattato in cap.~\ref{cha:TCP_socket} i socket TCP, che +costituiscono l'esempio più comune dell'interfaccia dei socket, esamineremo in +questo capitolo gli altri tipi di socket, a partire dai socket UDP, e i socket \textit{Unix domain} già incontrati in sez.~\ref{sec:ipc_socketpair}. @@ -54,7 +55,7 @@ utilizzando per il tipo di socket il valore \const{SOCK\_DGRAM}. Questa differenza comporta ovviamente che anche le modalità con cui si usano i socket UDP sono completamente diverse rispetto ai socket TCP, ed in particolare non esistendo il concetto di connessione non esiste il meccanismo -del \itindex{three~way~handshake}\textit{three way handshake} né quello degli +del \itindex{three~way~handshake} \textit{three way handshake} né quello degli stati del protocollo. In realtà tutto quello che avviene nella comunicazione attraverso dei socket UDP è la trasmissione di un pacchetto da un client ad un server o viceversa, secondo lo schema illustrato in @@ -266,7 +267,7 @@ l'indirizzo del mittente del pacchetto che opportunamente inizializzati con i puntatori alle variabili dove la struttura contenente quest'ultimo e la relativa lunghezza saranno scritti (si noti che \param{fromlen} è un valore intero ottenuto come -\itindex{value~result~argument}\textit{value result argument}). Se non si è +\itindex{value~result~argument} \textit{value result argument}). Se non si è interessati a questa informazione, entrambi gli argomenti devono essere inizializzati al valore \const{NULL}. @@ -784,14 +785,12 @@ stack dei protocolli. \label{sec:packet_socket} +% articoli interessanti: +% http://www.linuxjournal.com/article/5617 +% http://www.linuxjournal.com/article/4659 +% - -%%% Local Variables: -%%% mode: latex -%%% TeX-master: "gapil" -%%% End: - % LocalWords: socket cap TCP UDP domain sez NFS DNS stream datagram PF INET to % LocalWords: IPv tab SOCK DGRAM three way handshake client fig bind listen AF % LocalWords: accept recvfrom sendto connect netstat named DHCP kernel ICMP CR @@ -803,4 +802,11 @@ stack dei protocolli. % LocalWords: ECONNREFUSED value result argument close shutdown daytime nell' % LocalWords: memset inet pton nread NUL superdemone inetd sniffer daytimed % LocalWords: INADDR ANY addr echo ClientEcho sendbuff serv VPN tcpdump l'I -% LocalWords: Stevens destination descriptor raw stack netlink +% LocalWords: Stevens destination descriptor raw stack netlink packet + + + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "gapil" +%%% End: