Length returns the data length of a BFD Control message which changes based on the presence and type of authentication contained in the message
()
| 284 | // changes based on the presence and type of authentication |
| 285 | // contained in the message |
| 286 | func (d *BFD) Length() int { |
| 287 | if d.AuthPresent && (d.AuthHeader != nil) { |
| 288 | return bfdMinimumRecordSizeInBytes + d.AuthHeader.Length() |
| 289 | } |
| 290 | |
| 291 | return bfdMinimumRecordSizeInBytes |
| 292 | } |
| 293 | |
| 294 | // LayerType returns the layer type of the BFD object, which is LayerTypeBFD. |
| 295 | func (d *BFD) LayerType() gopacket.LayerType { |