raman325 / ostinato

Automatically exported from code.google.com/p/ostinato
GNU General Public License v3.0
0 stars 0 forks source link

Feature - Allow Increment/Decrement/Fixed modes on vlan fields #84

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Allow Increment/Decrement/Fixed modes on vlan fields

I have a need where I am incrementing MAC address, and IP Address for a bunch 
of clients but I may need them in different vlans  snd/or slans for every 
MAC/IP combination.   

What steps will reproduce the problem?
1. Go to Slan/Vlan 

What is the expected output? What do you see instead?

I need ability to have a mode pulldown next to vlan/slan which contains 
Increment/Decrement/Fixed like the MAC and IP fields on other panels 

What version and revision of the product are you using (available in the
About dialog)? On what operating system?

Windows (0.5.1)
Fedora (0.5.1)

Original issue reported on code.google.com by ftobias...@gmail.com on 16 Nov 2012 at 1:12

Attachments:

GoogleCodeExporter commented 9 years ago
For now, till this feature becomes available, you can use userscript protocol 
in place of VLAN/SVLAN.

See http://code.google.com/p/ostinato/wiki/UserScriptHOWTO

Original comment by pstav...@gmail.com on 16 Nov 2012 at 4:34

GoogleCodeExporter commented 9 years ago
Hi,

I worked on a userscript but still not able to increment the vlan id. Is there 
any function to do that?
pfv[3] is the variable hold the vlan id.

below is the script.

protocol.protocolFrameSize = function() { return 4; }
protocol.protocolId = function() { return 0x8100; }
protocol.protocolFrameValueVariable=true;
protocol.protocolFrameVariableCount=100;
protocol.protocolId = function(id)
{ return 200;
}

protocol.protocolFrameValue = function(index)
{
    var pfv = new Array(4);

    pfv.protocolFrameValueVariable=true;
    pfv.protocolFrameVariableCount=100;
    pfv.protocolFramePayloadVariableCount++;
    pfv[0] = 0x81;
    pfv[1]=0x00;
    pfv[3]=201;
    pfv[3].protocolFrameValueVariable=true;
    pfv[3].protocolFrameVariableCount=100
    pfv[3].protocolFramePayloadVariableCount++;
                    pfv[3]++;

return pfv;

}

Original comment by kam.t...@gmail.com on 1 Apr 2015 at 5:24

GoogleCodeExporter commented 9 years ago
@kam: Try the following (note: I haven't tested it)

protocol.protocolFrameSize = function() { return 4; }
protocol.protocolId = function(type) { return 0x8100; }
protocol.protocolFrameValueVariable=true;
protocol.protocolFrameVariableCount=100;

protocol.protocolFrameValue = function(index)
{
    var pfv = new Array(4);

    pfv[0] = 0x81;
    pfv[1] = 0x00;
    pfv[2] = 0x00;
    pfv[3] = 201+index;

        return pfv;
}

Original comment by pstav...@gmail.com on 2 Apr 2015 at 3:54

GoogleCodeExporter commented 9 years ago
Thanks a lot
It works great!!!

Original comment by kam.t...@gmail.com on 3 Apr 2015 at 5:56