blob: 954988456e720e912c6225a87f5ba2acdcd382c5 [file] [log] [blame]
Daniele Moro94660a02019-12-02 12:02:07 -08001/*
Joey Armstronga68e7852024-01-28 13:27:02 -05002 * Copyright 2019-2024 Open Networking Foundation (ONF) and the ONF Contributors
Daniele Moro94660a02019-12-02 12:02:07 -08003 *
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 org.opencord.bng;
18
19import org.onosproject.event.AbstractEvent;
20
21/**
22 * PPPoE attachment level event. This kind of events are used to advertise
23 * control level attachment events (e.g., attachment creation, successful
24 * authentication etc.)
25 */
26public final class PppoeEvent extends
27 AbstractEvent<PppoeEvent.EventType, PppoeEventSubject> {
28 /**
29 * Creates a new event for the given attachment information.
30 *
31 * @param type type
32 * @param subject the attachment event
33 */
34 public PppoeEvent(EventType type, PppoeEventSubject subject) {
35 super(type, subject);
36 }
37
38 /**
39 * Type of the event.
40 */
41 public enum EventType {
42 /**
43 * Signals that a PPPoE session has been initiated from the client.
44 */
45 SESSION_INIT,
46
47 /**
48 * Signal that a PPPoE session has been established.
49 */
50 SESSION_CONFIRMATION,
51
52 /**
53 * Signal that the PPPoE session has been terminated.
54 */
55 SESSION_TERMINATION,
56
57 /**
58 * Signals an IPCP configuration acknowledge event.
59 */
60 IPCP_CONF_ACK,
61
62 /**
63 * Signals an IPCP configuration request event.
64 */
65 IPCP_CONF_REQUEST,
66
67 /**
68 * Authentication initiated.
69 */
70 AUTH_REQUEST,
71
72 /**
73 * Authentication confirmation.
74 */
75 AUTH_SUCCESS,
76
77 /**
78 * Failed authentication.
79 */
80 AUTH_FAILURE
81 }
82}