github.com/GeniusesGroup/libgo@v0.0.0-20220929090155-5ff932cb408e/ipv4/errors.go (about)

     1  /* For license and copyright information please see LEGAL file in repository */
     2  
     3  package ipv4
     4  
     5  import (
     6  	er "../error"
     7  	"../mediatype"
     8  	"../protocol"
     9  )
    10  
    11  const domainEnglish = "IPv4"
    12  const domainPersian = "IPv4"
    13  
    14  // Errors
    15  var (
    16  	ErrPacketTooShort = er.New(mediatype.New("domain/ipv4.protocol.error; name=packet-too-short").SetDetail(protocol.LanguageEnglish, domainEnglish,
    17  		"Packet Too Short",
    18  		"IPv4 packet is empty or too short than standard minimum size. It must include at least 20Byte header",
    19  		"",
    20  		"",
    21  		nil).
    22  		Expired(0, nil))
    23  
    24  	ErrPacketWrongLength = er.New(mediatype.New("domain/ipv4.protocol.error; name=packet-wrong-length").SetDetail(protocol.LanguageEnglish, domainEnglish,
    25  		"Packet Wrong Length",
    26  		"Data offset set in IPv4 packet header is not set correctly",
    27  		"",
    28  		"",
    29  		nil).
    30  		Expired(0, nil))
    31  )