Package org.apache.directory.server.dhcp.options

Examples of org.apache.directory.server.dhcp.options.DhcpOption


        {
            byte[] list = prl.getData();

            for ( Iterator i = options.iterator(); i.hasNext(); )
            {
                DhcpOption o = ( DhcpOption ) i.next();

                boolean found = false;

                for ( int j = 0; j < list.length; j++ )
                {
                    if ( list[j] == o.getTag() )
                    {
                        found = true;
                        break;
                    }
                }
View Full Code Here


    {
        message.put( VENDOR_MAGIC_COOKIE );

        for ( Iterator i = options.iterator(); i.hasNext(); )
        {
            DhcpOption option = ( DhcpOption ) i.next();
            option.writeTo( message );
        }

        // add end option
        message.put( ( byte ) 0xff );
    }
View Full Code Here

    {
        try
        {
            Class c = DhcpOption.getClassByTag( tag );

            DhcpOption o = null != c ? ( DhcpOption ) c.newInstance() : new UnrecognizedOption( ( byte ) tag );
            o.setData( value );

            return o;
        }
        catch ( Exception e )
        {
View Full Code Here

        final ParameterRequestList prl = (ParameterRequestList) request
                .getOptions().get(ParameterRequestList.class);
        if (null != prl) {
            final byte[] list = prl.getData();
            for (final Iterator i = options.iterator(); i.hasNext();) {
                final DhcpOption o = (DhcpOption) i.next();
                for (int j = 0; j < list.length; j++)
                    if (list[j] == o.getTag())
                        continue;
                i.remove();
            }
        }
    }
View Full Code Here

    {
        message.put( VENDOR_MAGIC_COOKIE );

        for ( Iterator i = options.iterator(); i.hasNext(); )
        {
            DhcpOption option = ( DhcpOption ) i.next();
            option.writeTo( message );
        }

        // add end option
        message.put( ( byte ) 0xff );
    }
View Full Code Here

    {
        try
        {
            Class c = DhcpOption.getClassByTag( tag );

            DhcpOption o = null != c ? ( DhcpOption ) c.newInstance() : new UnrecognizedOption( ( byte ) tag );
            o.setData( value );

            return o;
        }
        catch ( Exception e )
        {
View Full Code Here

    {
        message.put( VENDOR_MAGIC_COOKIE );

        for ( Iterator i = options.iterator(); i.hasNext(); )
        {
            DhcpOption option = ( DhcpOption ) i.next();
            option.writeTo( message );
        }

        // add end option
        message.put( ( byte ) 0xff );
    }
View Full Code Here

        if ( null != prl )
        {
            final byte[] list = prl.getData();
            for ( final Iterator i = options.iterator(); i.hasNext(); )
            {
                final DhcpOption o = ( DhcpOption ) i.next();
                for ( int j = 0; j < list.length; j++ )
                    if ( list[j] == o.getTag() )
                        continue;
                i.remove();
            }
        }
    }
View Full Code Here

        final ParameterRequestList prl = (ParameterRequestList) request
                .getOptions().get(ParameterRequestList.class);
        if (null != prl) {
            final byte[] list = prl.getData();
            for (final Iterator i = options.iterator(); i.hasNext();) {
                final DhcpOption o = (DhcpOption) i.next();
                for (int j = 0; j < list.length; j++)
                    if (list[j] == o.getTag())
                        continue;
                i.remove();
            }
        }
    }
View Full Code Here

    {
        message.put( VENDOR_MAGIC_COOKIE );

        for ( Iterator i = options.iterator(); i.hasNext(); )
        {
            DhcpOption option = ( DhcpOption ) i.next();
            option.writeTo( message );
        }

        // add end option
        message.put( ( byte ) 0xff );
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.server.dhcp.options.DhcpOption

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.