Browse Source

internal/iana: update protocol numbers

Also fixes parseProtocolNumbers to make it possible to grab the recently
added keyword "deprecated" correctly.

Change-Id: I431da33a722eab9aa13ce1834acab4e9e6346bfd
Reviewed-on: https://go-review.googlesource.com/2852
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Mikio Hara 11 years ago
parent
commit
a1cbdfe7f2
2 changed files with 5 additions and 3 deletions
  1. 1 3
      internal/iana/const.go
  2. 4 0
      internal/iana/gen.go

+ 1 - 3
internal/iana/const.go

@@ -38,7 +38,7 @@ const (
 	CongestionExperienced = 0x3 // CE (Congestion Experienced)
 )
 
-// Protocol Numbers, Updated: 2014-08-12
+// Protocol Numbers, Updated: 2015-01-06
 const (
 	ProtocolIP             = 0   // IPv4 encapsulation, pseudo protocol number
 	ProtocolHOPOPT         = 0   // IPv6 Hop-by-Hop Option
@@ -94,7 +94,6 @@ const (
 	ProtocolESP            = 50  // Encap Security Payload
 	ProtocolAH             = 51  // Authentication Header
 	ProtocolINLSP          = 52  // Integrated Net Layer Security  TUBA
-	ProtocolSWIPE          = 53  // IP with Encryption
 	ProtocolNARP           = 54  // NBMA Address Resolution Protocol
 	ProtocolMOBILE         = 55  // IP Mobility
 	ProtocolTLSP           = 56  // Transport Layer Security Protocol using Kryptonet key management
@@ -134,7 +133,6 @@ const (
 	ProtocolMTP            = 92  // Multicast Transport Protocol
 	ProtocolAX25           = 93  // AX.25 Frames
 	ProtocolIPIP           = 94  // IP-within-IP Encapsulation Protocol
-	ProtocolMICP           = 95  // Mobile Internetworking Control Pro.
 	ProtocolSCCSP          = 96  // Semaphore Communications Sec. Pro.
 	ProtocolETHERIP        = 97  // Ethernet-within-IP Encapsulation
 	ProtocolENCAP          = 98  // Encapsulation Header

+ 4 - 0
internal/iana/gen.go

@@ -264,6 +264,10 @@ func (pn *protocolNumbers) escape() []canonProtocolRecord {
 		" ", "",
 	)
 	for i, pr := range pn.Records {
+		if strings.Contains(pr.Name, "Deprecated") ||
+			strings.Contains(pr.Name, "deprecated") {
+			continue
+		}
 		prs[i].OrigName = pr.Name
 		s := strings.TrimSpace(pr.Name)
 		switch pr.Name {