// Copyright 2014 The Go Authors. All rights reserved.// Use of this source code is governed by a BSD-style// license that can be found in the LICENSE file.packageicmp// A TimeExceeded represents an ICMP time exceeded message body.typeTimeExceededstruct{Data[]byte// data, known as original datagram fieldExtensions[]Extension// extensions}// Len implements the Len method of MessageBody interface.func(p*TimeExceeded)Len(protoint)int{ifp==nil{return0}l,_:=multipartMessageBodyDataLen(proto,true,p.Data,p.Extensions)return4+l}// Marshal implements the Marshal method of MessageBody interface.func(p*TimeExceeded)Marshal(protoint)([]byte,error){returnmarshalMultipartMessageBody(proto,true,p.Data,p.Extensions)}// parseTimeExceeded parses b as an ICMP time exceeded message body.funcparseTimeExceeded(protoint,typType,b[]byte)(MessageBody,error){iflen(b)<4{returnnil,errMessageTooShort}p:=&TimeExceeded{}varerrerrorp.Data,p.Extensions,err=parseMultipartMessageBody(proto,typ,b)iferr!=nil{returnnil,err}returnp,nil}