func DecodeLossDigestOption(opt *dccp.Option) *LossDigestOption { if opt.Type != OptionLossDigest || len(opt.Data) != 5 { return nil } return &LossDigestOption{ RateInv: dccp.DecodeUint32(opt.Data[0:4]), NewLossCount: dccp.DecodeUint8(opt.Data[4:5]), } }
func DecodeLossEventRateOption(opt *dccp.Option) *LossEventRateOption { if opt.Type != OptionLossEventRate || len(opt.Data) != 4 { return nil } return &LossEventRateOption{RateInv: dccp.DecodeUint32(opt.Data[0:4])} }
func DecodeRoundtripReportOption(opt *dccp.Option) *RoundtripReportOption { if opt.Type != OptionRoundtripReport || len(opt.Data) != 4 { return nil } return &RoundtripReportOption{Roundtrip: dccp.DecodeUint32(opt.Data[0:4])} }
func DecodeReceiveRateOption(opt *dccp.Option) *ReceiveRateOption { if opt.Type != OptionReceiveRate || len(opt.Data) != 4 { return nil } return &ReceiveRateOption{Rate: dccp.DecodeUint32(opt.Data[0:4])} }