blob: bf6f4a2d89c4214f62b7c7c637f1f0894649806f [file] [log] [blame]
karthik1977bc5ea1e2023-01-02 19:25:14 +05301/*
2 * Copyright 2023-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 */
16package org.onosproject.netflow;
17
18import com.google.common.base.MoreObjects;
19
20/**
21 * Template Records is given a unique Template ID.
22 * This uniqueness is local to the Observation
23 * Domain that generated the Template ID. Template IDs 0-255 are
24 * reserved for Template FlowSets, Options FlowSets, and other
25 * reserved FlowSets yet to be created. Template IDs of Data
26 * FlowSets are numbered from 256 to 65535.
27 * Ref: https://www.ietf.org/rfc/rfc3954.txt
28 */
29public class TemplateId {
30
31 private int id;
32
33 public TemplateId(int id) {
34 this.id = id;
35 }
36
37 public int getId() {
38 return id;
39 }
40
41 @Override
42 public String toString() {
43 return MoreObjects.toStringHelper(getClass())
44 .add("id", id)
45 .toString();
46 }
47
48}