github.com/GeniusesGroup/libgo@v0.0.0-20220929090155-5ff932cb408e/chapar/frame-structure.go (about)

     1  /* For license and copyright information please see LEGAL file in repository */
     2  
     3  package chapar
     4  
     5  // chapar represents Chapar frame structure!
     6  // It is just to show protocol in better way, we never use this type!
     7  // Read more about this protocol : https://github.com/GeniusesGroup/RFCs/blob/master/Chapar.md
     8  type chapar struct {
     9  	Header  header // Up to 258 Byte length!
    10  	Payload []byte // Up to 7934 Byte length!
    11  }
    12  
    13  // It is just to show protocol in better way, we never use this type!
    14  // up-to 255 switch port number can be in a frame header!
    15  type header struct {
    16  	NextHop          byte
    17  	HopCount         byte
    18  	NextHeader       byte
    19  	FirstHopPortNum  byte
    20   // SecondHopPortNum byte
    21   // ...              byte
    22  	Payload          []byte
    23  }