blob: c89443b6505f729e289b41d137f49a418197b853 [file] [log] [blame]
Matteo Scandolo40e067f2019-10-16 16:59:41 -07001/*
2 * Copyright 2018-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 packetHandlers
18
19type PacketType int
20
21const (
22 UNKNOWN PacketType = iota
23 EAPOL
24 DHCP
Matteo Scandolo618a6582020-09-09 12:21:29 -070025 IGMP
Matteo Scandolo40e067f2019-10-16 16:59:41 -070026)
27
28func (t PacketType) String() string {
29 names := [...]string{
30 "UNKNOWN",
31 "EAPOL",
32 "DHCP",
Matteo Scandolo618a6582020-09-09 12:21:29 -070033 "IGMP",
Matteo Scandolo40e067f2019-10-16 16:59:41 -070034 }
35 return names[t]
36}