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-Compression attribute as specified in section 5.13 of RFC 2865.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowenpublic class FramedCompressionAttribute extends Attribute {
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * This compression value indicates no compression.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * This compression value indicates VJ TCP/IP header compression.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * This compression value indicates IPX header compression.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * This compression value indicates Stac-LZS compression.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * The compression type.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * Construct a new instance from the compression type.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * @param compression the compression type that should be applied
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen public FramedCompressionAttribute(int compression) {
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen super(OctetUtils.toOctets(AttributeType.FRAMED_COMPRESSION, compression));
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 FramedCompressionAttribute(byte[] octets) {
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * Returns the desired compression indicator.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * @return the compression indicator.
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