File: address-apis.txt

package info (click to toggle)
acl2 8.5dfsg-5
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 991,452 kB
  • sloc: lisp: 15,567,759; javascript: 22,820; cpp: 13,929; ansic: 12,092; perl: 7,150; java: 4,405; xml: 3,884; makefile: 3,507; sh: 3,187; ruby: 2,633; ml: 763; python: 746; yacc: 723; awk: 295; csh: 186; php: 171; lex: 154; tcl: 49; 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