%\item \errcode{EGRATUITOUS} \textit{} roba di Hurd, pare.
-\item \errcode{EBADMSG} \textit{Not a data message}. Definito da Posix come
+\item \errcode{EBADMSG} \textit{Not a data message}. Definito da POSIX come
errore che arriva ad una funzione di lettura che opera su uno stream. Non
essendo gli stream definiti su Linux il kernel non genera mai questo tipo di
messaggio.
-\item \errcode{EMULTIHOP} \textit{Multihop attempted}. Definito da Posix come
+\item \errcode{EMULTIHOP} \textit{Multihop attempted}. Definito da POSIX come
errore dovuto all'accesso a file remoti attraverso più macchine, quando ciò
non è consentito. Non viene mai generato su Linux.
\item \errcode{EIDRM} \textit{Identifier removed}. Indica che l'oggetto del
\textit{SysV IPC} a cui si fa riferimento è stato cancellato.
-\item \errcode{ENODATA} \textit{No data available}. Viene indicato da Posix
+\item \errcode{ENODATA} \textit{No data available}. Viene indicato da POSIX
come restituito da una \func{read} eseguita su un file descriptor in
modalità non bloccante quando non ci sono dati. In realtà in questo caso
viene utilizzato \errcode{EAGAIN}. In Linux viene utilizzato dalle funzioni
% LocalWords: EILSEQ Illegal sequence EBADMSG message EIDRM Identifier removed
% LocalWords: SysV EMULTIHOP Multihop attempted ENODATA ENOLINK been severed
% LocalWords: ENOMSG desired ENOSR streams resources ENOSTR stream EOVERFLOW
-% LocalWords: Value large defined STAT EPROTO ETIME Timer expired
+% LocalWords: Value large defined STAT EPROTO ETIME Timer expired group wait
+% LocalWords: waitpid Specification cap USB did respond
%%% Local Variables:
% LocalWords: flock shared exclusive operation dup inode linked NFS cmd ENOLCK
% LocalWords: EDEADLK whence SEEK CUR type pid GETLK SETLK SETLKW all'inode HP
% LocalWords: switch bsd lockf mandatory SVr sgid group root mount mand TRUNC
-% LocalWords: SVID UX Documentation sendfile
+% LocalWords: SVID UX Documentation sendfile dnotify inotify NdA
%%% Local Variables:
%% license is included in the section entitled "GNU Free Documentation
%% License".
%%
+
\chapter{File e directory}
\label{cha:files_and_dirs}
replicare all'interno della \textit{chroot jail} tutti i file (in genere
programmi e librerie) di cui il server potrebbe avere bisogno.
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: "gapil"
-%%% End:
-
% LocalWords: sez like filesystem unlink MacOS Windows VMS inode kernel unistd
% LocalWords: un'etichetta int const char oldpath newpath errno EXDEV EPERM st
% LocalWords: EEXIST EMLINK EACCES ENAMETOOLONG ENOTDIR EFAULT ENOMEM EROFS ls
% LocalWords: gid Control List patch mandatory control execute group other all
% LocalWords: dell' effective passwd IGID locking swap saved text IRWXU IRWXG
% LocalWords: IRWXO ext reiser capability FSETID mask capabilities chroot jail
-% LocalWords: FTP Di
+% LocalWords: FTP Di filter reiserfs
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: "gapil"
+%%% End:
%% license is included in the section entitled "GNU Free Documentation
%% License".
%%
+
\chapter{L'architettura dei file}
\label{cha:file_intro}
%% license is included in the section entitled "GNU Free Documentation
%% License".
%%
+
\chapter{I file: l'interfaccia standard Unix}
\label{cha:file_unix_interface}
\end{basedescript}
relativi ad operazioni comunque eseguibili anche attraverso \func{fcntl}.
-
-
% TODO estendere la lista delle ioctl sui file
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: "gapil"
-%%% End:
-
% LocalWords: descriptor system call cap like kernel sez l'inode inode VFS tab
% LocalWords: process table struct files flags pos all'inode dentry fig shell
% LocalWords: error POSIX STDIN FILENO STDOUT STDERR unistd read write lseek
% LocalWords: fdatasync fstat ext dup oldfd newfd DUPFD cmd long arg flock pid
% LocalWords: SETFD GETFD GETFL SETFL GETLK SETLK SETLKW GETOWN group SIGURG
% LocalWords: SETOWN GETSIG SETSIG sigaction SIGINFO siginfo SETLEASE lease is
-% LocalWords: truncate GETLEASE NOTIFY all'I AND ACCMODE ioctl everything argp
+% LocalWords: truncate GETLEASE NOTIFY AND ACCMODE ioctl everything argp all'I
% LocalWords: framebuffer request ENOTTY CDROM nell'header magic number
% LocalWords: FIOCLEX FIONCLEX FIOASYNC FIONBIO NOATIME
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: "gapil"
+%%% End:
%% intro.tex
%%
-%% Copyright (C) 2000-2006 Simone Piccardi. Permission is granted to
+%% Copyright (C) 2000-2007 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",
%% license is included in the section entitled "GNU Free Documentation
%% License".
%%
+
\chapter{L'architettura del sistema}
\label{cha:intro_unix}
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: "gapil"
-%%% End:
-
% LocalWords: like kernel multitasking scheduler prehemptive sez swap is cap
% LocalWords: everything bootstrap init shell Windows Foundation system call
% LocalWords: fig libc uClib glibc embedded Library POSIX username PAM Methods
% LocalWords: socket Spec Novell Specification SUSv CDE Motif Berkley select
% LocalWords: SunOS l'AT Sun HP Xenix Description SVID Laboratories MP hsearch
% LocalWords: drand fmtmsg define SOURCE lbsd compat XOPEN version ISOC Large
-% LocalWords: LARGEFILE Support LFS
+% LocalWords: LARGEFILE Support LFS dell'
+
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: "gapil"
+%%% End:
%% ipc.tex
%%
-%% Copyright (C) 2000-2006 Simone Piccardi. Permission is granted to
+%% Copyright (C) 2000-2007 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",
%% license is included in the section entitled "GNU Free Documentation
%% License".
%%
+
\chapter{La comunicazione fra processi}
\label{cha:IPC}
restituendo al chiamante il valore di ritorno.
-
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: "gapil"
-%%% End:
-
% LocalWords: like fifo System POSIX RPC Calls Common Object Request Brocker
% LocalWords: Architecture descriptor kernel unistd int filedes errno EMFILE
% LocalWords: ENFILE EFAULT BUF sez fig fork Stevens siblings EOF read SIGPIPE
% LocalWords: PDF EPS lseek ESPIPE PPM Portable PixMap format pnmcrop PNG pnm
% LocalWords: pnmmargin png BarCode inode filesystem l'inode mknod mkfifo RDWR
% LocalWords: ENXIO deadlock client reinviate fortunes fortunefilename daemon
-% LocalWords: FortuneServer FortuneParse FortuneClient pid libgapil LD LIBR<ARY
+% LocalWords: FortuneServer FortuneParse FortuneClient pid libgapil LD
% LocalWords: PATH linker pathname ps tmp killall fortuned crash socket domain
% LocalWords: socketpair BSD sys protocol sv EAFNOSUPPORT EPROTONOSUPPORT AF
% LocalWords: EOPNOTSUPP SOCK SysV IPC Process Comunication ipc perm key exec
% LocalWords: Konstantin Knizhnik futex tmpfs ramfs cache shared swap CONFIG
% LocalWords: lrt blocks PAGECACHE TRUNC CLOEXEC mmap ftruncate munmap FindShm
% LocalWords: CreateShm RemoveShm LIBRARY
+
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: "gapil"
+%%% End:
\section{Il protocollo ICMP}
\label{sec:icmp_protocol}
-Il protocollo ICMP \textit{Internet Control Message Protocolo} è un protocollo
+Il protocollo ICMP \textit{Internet Control Message Protocol} è un protocollo
di servizio fondamentale per il funzionamento del livello di rete. I pacchetti
% LocalWords: sull'host loopback scop all nodes routers rip cbt name dhcp HBH
% LocalWords: agents servers relays solicited extension options route Keyword
% LocalWords: Authentication Encapsulation ICMP Control Message GGP Gateway ST
-% LocalWords: encapsulation Stream Trasmission Datagram RH FH IDRP ESP Null
+% LocalWords: encapsulation Stream Trasmission Datagram RH FH IDRP ESP Null ip
% LocalWords: Encrypted Security IGRP OSPF Short First tunnelling FFFFFF hash
% LocalWords: news FTP NFS authentication Parameter Index ICV Integrity Value
-% LocalWords: padding Option gateway dell'MD keyed Encripted IEEE ethernet
+% LocalWords: padding Option gateway dell'MD keyed Encripted IEEE ethernet any
% LocalWords: dell'autoconfigurazione L'autoconfigurazione Solicitation l'IP
-% LocalWords: stateless solicitation Advertisement stateful Transfer Unit
-% LocalWords: l'autoconfigurazione
-
+% LocalWords: stateless solicitation Advertisement stateful Transfer Unit echo
+% LocalWords: l'autoconfigurazione reply request unreachable all'IP quench TTL
+% LocalWords: redirect exceeded parameter problem timestamp info mask port ttl
+% LocalWords: needed failed unknown isolated prohibited communication cutoff
+% LocalWords: precedence violation during reassembly bad required option
+% LocalWords: missing
-
-
-%%% 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
% 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:
%% license is included in the section entitled "GNU Free Documentation
%% License".
%%
+
\chapter{Un preambolo}
\label{cha:preamble}
%% license is included in the section entitled "GNU Free Documentation
%% License".
%%
+
\chapter{Prefazione}
\label{cha:preface}
\label{sec:proc_race_cond}
\itindbeg{race~condition}
+
Si definiscono \textit{race condition} tutte quelle situazioni in cui processi
diversi operano su una risorsa comune, ed in cui il risultato viene a
dipendere dall'ordine in cui essi effettuano le loro operazioni. Il caso
L'argomento \param{handler} che indica il gestore invece, oltre all'indirizzo
della funzione da chiamare all'occorrenza del segnale, può assumere anche i
due valori costanti \const{SIG\_IGN} e \const{SIG\_DFL}; il primo indica che
-il segnale deve essere ingnorato,\footnote{si ricordi però che i due segnali
+il segnale deve essere ignorato,\footnote{si ricordi però che i due segnali
\const{SIGKILL} e \const{SIGSTOP} non possono essere né ignorati né
intercettati; l'uso di \const{SIG\_IGN} per questi segnali non ha alcun
effetto.} mentre il secondo ripristina l'azione predefinita.\footnote{e
serve a tornare al comportamento di default quando non si intende più
- gesrire direttamente un segnale.}
+ gestire direttamente un segnale.}
La funzione restituisce l'indirizzo dell'azione precedente, che può essere
salvato per poterlo ripristinare (con un'altra chiamata a \func{signal}) in un
dedicato alla gestione, che potrebbe riceverlo fra due chiamate successive.
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: "gapil"
-%%% End:
-
% LocalWords: kernel POSIX timer shell control ctrl kill raise signal handler
% LocalWords: reliable unreliable fig race condition sez struct process table
% LocalWords: delivered pending scheduler sigpending l'I suspend SIGKILL wait
% LocalWords: how oldset BLOCK UNBLOCK SETMASK sigsuspend sigaltstack malloc
% LocalWords: SIGSTKSZ MINSIGSTKSZ ss oss ENOMEM flags DISABLE sp setrlimit LB
% LocalWords: RLIMIT rlim sigsetjmp siglongjmp sigjmp buf env savesigs jmp ptr
-% LocalWords: SIGRTMIN SIGRTMAX sigval sival sigevent sigqueue EAGAIN sysctl
+% LocalWords: SIGRTMIN SIGRTMAX sigval sigevent sigqueue EAGAIN sysctl
% LocalWords: QUEUE thread sigwait sigwaitinfo sigtimedwait info DEF SLB
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: "gapil"
+%%% End:
significato di tali opzioni e le modalità con cui esse possono essere
utilizzate ed impostate.
+% LocalWords: socket of multiplexing sez sendmsg recvmsg RECVERR kernel MSG
+% LocalWords: ERRQUEUE sock err fig TCP dell'I setsockopt OPTIONS urgent poll
+% LocalWords: select descriptor exceptfds POLLRDBAND OOBINLINE ioctl all' mark
+% LocalWords: SIOCATMARK
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "gapil"
%%% End:
-
-% LocalWords: socket of multiplexing sez sendmsg recvmsg RECVERR kernel MSG
-% LocalWords: ERRQUEUE sock err fig TCP dell'I setsockopt OPTIONS urgent poll
-% LocalWords: select descriptor exceptfds POLLRDBAND OOBINLINE ioctl all' mark
-% LocalWords: SIOCATMARK
% LocalWords: rename ifconf syndrome dell'ACK FTP ACCEPTFILTER advanced reno
% LocalWords: congestion control Networking cubic CUBIC highspeed HSTCP htcp
% LocalWords: HTCP hybla HYBLA scalable SCALABLE ifc req iflist access ntoa
+% LocalWords: hop Selective Acknowledgement acknowledgement Explicit RTO stack
+% LocalWords: Notification wireless denial pressure
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "gapil"
%%% End:
-% LocalWords: hop Selective Acknowledgement acknowledgement Explicit RTO stack
-% LocalWords: Notification wireless denial pressure
+
\index{socket!definizione|)}
-
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: "gapil"
-%%% End:
-
% LocalWords: socket sez cap BSD SVr XTI Transport Interface TCP stream UDP PF
% LocalWords: datagram broadcast descriptor sys int domain type protocol errno
% LocalWords: EPROTONOSUPPORT ENFILE kernel EMFILE EACCES EINVAL ENOBUFS raw
% LocalWords: strptr struct dest addrptr INADDR NULL pton ntop presentation af
% LocalWords: numeric EAFNOSUPPORT size ENOSPC ENOAFSUPPORT ADDRSTRLEN ROUTE
% LocalWords: of tcpdump
+
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: "gapil"
+%%% End:
che errori relativi alla stessa linea non vengano ripetuti.
-
-
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: "gapil"
-%%% End:
-
% LocalWords: filesystem like kernel saved header limits sysconf sez tab float
% LocalWords: FOPEN stdio MB LEN CHAR char UCHAR unsigned SCHAR MIN signed INT
% LocalWords: SHRT short USHRT int UINT LONG long ULONG LLONG ULLONG POSIX ARG
% LocalWords: strftime thread EOF modifiable lvalue app errcode strerror LC at
% LocalWords: perror string errnum MESSAGES error message ErrCode strtol log
% LocalWords: program invocation argv printf print progname exit count fname
-% LocalWords: lineno one standardese Di
+% LocalWords: lineno one standardese Di
+
+
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: "gapil"
+%%% End:
inserendola anche lui nel suo SYN di risposta dell'apertura della
connessione.} per la connessione corrente (espresso come numero di bit cui
spostare a sinistra il valore della finestra annunciata inserito nel
- pacchetto). Con Linux è possibile indicare al kernel di far negozioare il
+ pacchetto). Con Linux è possibile indicare al kernel di far negoziare il
fattore di scala in fase di creazione di una connessione tramite la
\textit{sysctl} \texttt{tcp\_window\_scaling} (vedi
sez.~\ref{sec:sock_ipv4_sysctl}).\footnote{per poter usare questa
funzionalità è comunque necessario ampliare le dimensioni dei buffer di
ricezione e spedizione, cosa che può essere fatta sia a livello di sistema
- con le opportune \textit{sysct} (vedi sez.~\ref{sec:sock_ipv4_sysctl}) che
+ con le opportune \textit{sysctl} (vedi sez.~\ref{sec:sock_ipv4_sysctl}) che
a livello di singoli socket con le relative opzioni (vedi
sez.~\ref{sec:sock_tcp_udp_options}).}
% LocalWords: header stack kernel SYN ACK URG syncronize sez bind listen fig
% LocalWords: accept connect active acknowledge l'acknowledge nell'header MSS
% LocalWords: sequence number l'acknowledgement dell'header options l'header
-% LocalWords: option MMS segment size MAXSEG window advertized Mbit sec nell'
+% LocalWords: option MMS segment size MAXSEG window advertised Mbit sec nell'
% LocalWords: timestamp RFC long fat close of l'end l'ACK half shutdown CLOSED
% LocalWords: netstat SENT ESTABLISHED WAIT IPv Ethernet piggybacking UDP MSL
% LocalWords: l'overhead Stevens Lifetime router hop limit TTL to live RST SSH
% LocalWords: SNDLOWAT third fset maxfd fileno ISSET closed how SHUT RD WR eof
% LocalWords: RDWR fifo Trip ping fourth CLR sull'I SETSIZE nread break Denial
% LocalWords: Service poll POLLIN POLLRDNORM POLLPRI POLLRDBAND POLLOUT events
-% LocalWords: POLLHUP POLLERR revents pollfd Di
+% LocalWords: POLLHUP POLLERR revents pollfd Di scaling SYNCNT DoS
%%% Local Variables:
%%% mode: latex
%% license is included in the section entitled "GNU Free Documentation
%% License".
%%
+
\chapter{Il livello di trasporto}
\label{cha:transport_layer}
dopo il TCP è il protocollo più usato dalle applicazioni di rete.
-
\begin{figure}[htb]
\centering
\includegraphics[width=10cm]{img/udp_head}
+% LocalWords: sez TCP fig netstat UDP Segment Size advertised window
+
+
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "gapil"
%%% End:
-
-% LocalWords: sez TCP fig netstat UDP