blob: f3efa2417fd688f1bc10ba9581c69641d62f7e04 [file] [log] [blame]
Takahiro Suzukid7bf8202020-12-17 20:21:59 +09001/*
2 * Copyright 2020-present Open Networking Foundation
3
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7
8 * http://www.apache.org/licenses/LICENSE-2.0
9
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package l2oam
18
19import (
20 "github.com/google/gopacket"
21)
22
23// GenerateGetUnipInfo generates UnipInfo message
24func GenerateGetUnipInfo(pkgType string) gopacket.SerializableLayer {
25 if pkgType == OnuPkgTypeB {
26 return &TibitFrame{
27 Data: []byte{
28 0x03, 0x00, 0x50, 0xfe, 0x90, 0x82, 0x60, 0x00,
29 0xca, 0xfe, 0x00, 0xb6, 0x00, 0x01, 0x04, 0x00,
30 0x00, 0x00, 0x00, 0xb7, 0x00, 0x41,
31 },
32 }
33 }
34 return &TibitFrame{
35 Data: []byte{
36 0x03, 0x00, 0x50, 0xfe, 0x00, 0x10, 0x00, 0x01,
37 0xd6, 0x00, 0x03, 0x01, 0x00, 0x07, 0x00, 0x20,
38 0x07, 0x00, 0x5d, 0x07, 0x00, 0x5a, 0x07, 0x00,
39 0x4f, 0x07, 0x00, 0xa3, 0x07, 0x00, 0x1a, 0x07,
40 0x00, 0x47, 0x07, 0x00, 0xb0, 0x00, 0x00,
41 },
42 }
43}