func (i *IE) MBR() ([]byte, error) {
	if len(i.Payload) < 10 {
		return nil, io.ErrUnexpectedEOF
	}
	switch i.Type {
	case MBR:
		return i.Payload, nil
	case CreateQER:
		ies, err := i.CreateQER()
		if err != nil {
			return nil, err
		}
		for _, x := range ies {
			if x.Type == MBR {
				return x.MBR()
			}
		}
		return nil, ErrIENotFound
	case UpdateQER:
		ies, err := i.UpdateQER()
		if err != nil {
			return nil, err
		}
		for _, x := range ies {
			if x.Type == MBR {
				return x.MBR()
			}
		}
		return nil, ErrIENotFound
	default:
		return nil, &InvalidTypeError{Type: i.Type}
	}
}
MBR returns MBR in []byte if the type of IE matches.
package ie
import (
	"io"
	"github.com/wmnsk/go-pfcp/internal/utils"
)
func NewMBR(ul, dl uint64) *IE {
	i := New(MBR, make([]byte, 10))
	copy(i.Payload[0:5], utils.Uint64To40(ul))
	copy(i.Payload[5:10], utils.Uint64To40(dl))
	return i
}