5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * The contents of this file are subject to the terms
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * of the Common Development and Distribution License
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * (the License). You may not use this file except in
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * compliance with the License.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * You can obtain a copy of the License at
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * https://opensso.dev.java.net/public/CDDLv1.0.html or
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * See the License for the specific language governing
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * permission and limitations under the License.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * When distributing Covered Code, include this CDDL
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * Header Notice in each file and include the License file
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * If applicable, add the following below the CDDL Header,
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * with the fields enclosed by brackets [] replaced by
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * your own identifying information:
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * "Portions Copyrighted [year] [name of copyright owner]"
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * $Id: AccessAccept.java,v 1.2 2008/06/25 05:42:00 qcheng Exp $
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * Portions Copyrighted [2011] [ForgeRock AS]
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * Portions Copyrighted [2015] [Intellectual Reserve, Inc (IRI)]
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowenpackage org.forgerock.openam.radius.common.packet;
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowenimport org.forgerock.openam.radius.common.Attribute;
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowenimport org.forgerock.openam.radius.common.AttributeType;
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowenimport org.forgerock.openam.radius.common.OctetUtils;
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * Class representing the structure of the Framed-AppleTalk-Link attribute as specified in section 5.37 of RFC 2865.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowenpublic class FramedAppleTalkNetworkAttribute extends Attribute {
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * The special link value that indicates an unnumbered link.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * The network number value between 0 and 65535.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * Construct a new instance from the network number it should represent between 0 and 65535 notwithstanding use
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * of an integer. The int type is used since short types in java are signed and hence can't represent an unsigned
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * value of 32786 or greater. A value of 0 indicates that the NAS should assign a network for the user.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * @param networkNumber the network number that should be between 0 and 65535 inclusive.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen public FramedAppleTalkNetworkAttribute(int networkNumber) {
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen super(OctetUtils.toOctets(AttributeType.FRAMED_APPLETALK_NETWORK, networkNumber));
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * Constructs a new instance from the on-the-wire bytes for this attribute including the prefixing attribute-type
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * code octet and length octet.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * @param octets the on-the-wire bytes from which to construct this instance
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen public FramedAppleTalkNetworkAttribute(byte[] octets) {
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * Returns the apple talk network number between 0 and 65535 to probe to allocate a node for the user.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * @return the apple talk network number.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * Indicates if the NAS should assign a network for the user.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * @return true if the NAS should assign a network for the user.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * Used by super class to log the attribute's contents when packet logging is enabled.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * @return content representation for traffic logging