File: address-apis.txt

package info (click to toggle)
acl2 8.0dfsg-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 226,956 kB
  • sloc: lisp: 2,678,900; ansic: 6,101; perl: 5,816; xml: 3,586; cpp: 2,624; ruby: 2,576; makefile: 2,443; sh: 2,312; python: 778; yacc: 764; ml: 763; awk: 260; csh: 186; php: 171; lex: 165; tcl: 44; java: 41; asm: 23; haskell: 17
file content (73 lines) | stat: -rw-r--r-- 1,688 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73

                                                           -*- text -*-

Step 2 of the master plan: Implementing (get-local-address sock) and
(get-peer-address sock).


Step 2 is about implementing:

 (get-local-address sock) -> ip
 (get-peer-address sock) -> ip
 (get-local-port sock) -> port
 (get-peer-port sock) -> port
 (get-local-name sock) -> ip, port
 (get-peer-name sock) -> ip, port


ABCL
====

 FFI / J-calls to "getLocalAddress"+"getAddress", "getLocalPort" (local)
 FFI / J-calls to "getInetAddress"+"getAddress", "getPort" (peer)

 (see SLIME / swank-abcl.lisp for an example on how to do that)


Allegro
=======

 (values (socket:remote-host sock)
         (socket:remote-port)) -> 32bit ip, port

 (values (socket:local-host sock)
         (socket:local-port sock)) -> 32bit ip, port

CLISP
=====

 (socket:socket-stream-local sock nil) -> address (as dotted quad), port
 (socket:socket-stream-peer sock nil) -> address (as dotted quad), port


CMUCL
=====

 (ext:get-peer-host-and-port sock-fd) -> 32-bit-addr, port (peer)
 (ext:get-socket-host-and-port sock-fd) -> 32-bit-addr, port (local)


LispWorks
=========

 (comm:socket-stream-address sock-stream) -> 32-bit-addr, port
   or: (comm:get-socket-address sock) -> 32-bit-addr, port

 (comm:socket-stream-peer-address sock-stream) -> 32-bit-addr, port
   or: (comm:get-socket-peer-address sock) -> 32-bit-addr, port


OpenMCL
=======

 (values (ccl:local-host sock) (ccl:local-port sock)) -> 32-bit ip, port
 (values (ccl:remote-host sock) (ccl:remote-port sock)) -> 32-bit ip, port


SBCL
====

 (sb-bsd-sockets:socket-name sock) -> vector-quad, port
 (sb-bsd-sockets:socket-peer-name sock) -> vector-quad, port