Skip to content

Commit d93ccc5

Browse files
use decimal numbers for multicodecs
1 parent 450ddd9 commit d93ccc5

File tree

1 file changed

+35
-35
lines changed

1 file changed

+35
-35
lines changed

protocols.go

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,41 @@ package multiaddr
33
// You **MUST** register your multicodecs with
44
// https://github.com/multiformats/multicodec before adding them here.
55
const (
6-
P_IP4 = 0x0004
7-
P_TCP = 0x0006
8-
P_DNS = 0x0035 // 4 or 6
9-
P_DNS4 = 0x0036
10-
P_DNS6 = 0x0037
11-
P_DNSADDR = 0x0038
12-
P_UDP = 0x0111
13-
P_DCCP = 0x0021
14-
P_IP6 = 0x0029
15-
P_IP6ZONE = 0x002A
16-
P_IPCIDR = 0x002B
17-
P_QUIC = 0x01CC
18-
P_WEBTRANSPORT = 0x01D1
19-
P_CERTHASH = 0x01D2
20-
P_SCTP = 0x0084
21-
P_CIRCUIT = 0x0122
22-
P_UDT = 0x012D
23-
P_UTP = 0x012E
24-
P_UNIX = 0x0190
25-
P_P2P = 0x01A5
26-
P_IPFS = 0x01A5 // alias for backwards compatibility
27-
P_HTTP = 0x01E0
28-
P_HTTPS = 0x01BB // deprecated alias for /tls/http
29-
P_ONION = 0x01BC // also for backwards compatibility
30-
P_ONION3 = 0x01BD
31-
P_GARLIC64 = 0x01BE
32-
P_GARLIC32 = 0x01BF
33-
P_P2P_WEBRTC_DIRECT = 0x0114
34-
P_TLS = 0x01c0
35-
P_SNI = 0x01c1
36-
P_NOISE = 0x01c6
37-
P_WS = 0x01DD
38-
P_WSS = 0x01DE // deprecated alias for /tls/ws
39-
P_PLAINTEXTV2 = 0x706c61
40-
P_WEBRTC = 0x118
6+
P_IP4 = 4
7+
P_TCP = 6
8+
P_DNS = 53 // 4 or 6
9+
P_DNS4 = 54
10+
P_DNS6 = 55
11+
P_DNSADDR = 56
12+
P_UDP = 273
13+
P_DCCP = 33
14+
P_IP6 = 41
15+
P_IP6ZONE = 42
16+
P_IPCIDR = 43
17+
P_QUIC = 460
18+
P_WEBTRANSPORT = 465
19+
P_CERTHASH = 466
20+
P_SCTP = 132
21+
P_CIRCUIT = 290
22+
P_UDT = 301
23+
P_UTP = 302
24+
P_UNIX = 400
25+
P_P2P = 421
26+
P_IPFS = P_P2P // alias for backwards compatibility
27+
P_HTTP = 480
28+
P_HTTPS = 443 // deprecated alias for /tls/http
29+
P_ONION = 444 // also for backwards compatibility
30+
P_ONION3 = 445
31+
P_GARLIC64 = 446
32+
P_GARLIC32 = 447
33+
P_P2P_WEBRTC_DIRECT = 276
34+
P_TLS = 448
35+
P_SNI = 449
36+
P_NOISE = 454
37+
P_WS = 477
38+
P_WSS = 478 // deprecated alias for /tls/ws
39+
P_PLAINTEXTV2 = 7367777
40+
P_WEBRTC = 280
4141
)
4242

4343
var (

0 commit comments

Comments
 (0)