[next] [tail] [up]

### 20.1 Types, Constants and variables :

The following constants identify the different socket types, as needed in the Socket (671) call.

     SOCK_STREAM     = 1; { stream (connection) socket   }
     SOCK_DGRAM      = 2; { datagram (conn.less) socket  }
     SOCK_RAW        = 3; { raw socket                   }
     SOCK_RDM        = 4; { reliably-delivered message   }
     SOCK_SEQPACKET  = 5; { sequential packet socket     }
     SOCK_PACKET     =10;

The following constants determine the socket domain, they are used in the Socket (671) call.

     AF_UNSPEC       = 0;
     AF_UNIX         = 1; { Unix domain sockets          }
     AF_INET         = 2; { Internet IP Protocol         }
     AF_AX25         = 3; { Amateur Radio AX.25          }
     AF_IPX          = 4; { Novell IPX                   }
     AF_APPLETALK    = 5; { Appletalk DDP                }
     AF_NETROM       = 6; { Amateur radio NetROM         }
     AF_BRIDGE       = 7; { Multiprotocol bridge         }
     AF_AAL5         = 8; { Reserved for Werner's ATM    }
     AF_X25          = 9; { Reserved for X.25 project    }
     AF_INET6        = 10; { IP version 6                 }
     AF_MAX          = 12;

The following constants determine the protocol family, they are used in the Socket (671) call.

     PF_UNSPEC       = AF_UNSPEC;
     PF_UNIX         = AF_UNIX;
     PF_INET         = AF_INET;
     PF_AX25         = AF_AX25;
     PF_IPX          = AF_IPX;
     PF_APPLETALK    = AF_APPLETALK;
     PF_NETROM       = AF_NETROM;
     PF_BRIDGE       = AF_BRIDGE;
     PF_AAL5         = AF_AAL5;
     PF_X25          = AF_X25;
     PF_INET6        = AF_INET6;
     PF_MAX          = AF_MAX;

The following types are used to store different kinds of eddresses for the Bind (662), Recv (668) and Send (669) calls.

     TSockAddr = packed Record
       family:word;
       data  :array [0..13] of char;
       end;
     TUnixSockAddr = packed Record
       family:word;
       path:array[0..108] of char;
       end;
     TInetSockAddr = packed Record
       family:Word;
       port  :Word;
       addr  :Cardinal;
       pad   :array [1..8] of byte;
       end;

The following type is returned by the SocketPair (672) call.

     TSockArray = Array[1..2] of Longint;

[next] [front] [up]