blob: 5c4f1905f666e462f75bf04e74221ec77a3e59d4 [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 */
Kengof20xx05d74022020-12-21 11:56:38 +090016
Takahiro Suzukid7bf8202020-12-17 20:21:59 +090017package l2oam
18
19import (
20 "github.com/google/gopacket"
21)
22
23//
24func GenerateSetRequestSaved() gopacket.SerializableLayer {
25
26 tibitData := &TOAMSetRequest{
27 // IEEE 1904.2
28 Opcode: 0x03,
29 // OAM Protocol
30 Flags: 0x0050,
31 OAMPDUCode: 0xfe,
32 OUId: []byte{0x2a, 0xea, 0x15},
33 // TiBit OLT Management Interface
34 TOMIOpcode: 0x43,
35 // Correlation Tag
36 CTBranch: 0x0c,
37 CTType: 0x0c7a,
38 CTLength: 4,
39 CTInstance: getOltInstance(),
40 // Object Context
41 OCBranch: 0x0c,
42 OCType: 0x0007,
43 OCLength: 4,
44 OCInstance: 0x00000000,
45 // Vc
46 VcBranch: 0xcc,
47 VcLeaf: 0x0004,
48 VcLength: 2,
49 // EC
50 ECLength: 1,
51 ECValue: []byte{0x20},
52 // End
53 EndBranch: 0x00,
54 }
55 return tibitData
56}