WANem scriptable

2008-03-06
2013-02-03
  • Mike Byrnes
    Mike Byrnes
    2008-03-06

    Hi,
    we like the features of WANem but we are trying to do things in a remote scriptable procedure.
    Is there a way to modify the Advanced Mode Operation fields for an interface in this manner?
    Thanks,
    Mike Byrnes

     
    • M K Nambiar
      M K Nambiar
      2008-03-07

      Hello Mike,

      Yes you operate WANem remotely. The script should send HTTP POST request to the WANem web server.

      This can be done by using web recording & playback tools. These tools can also help you parameterize values in the generated scripts.

      Some popular tools I know of are (there could be many others)
      1> OpenSTA (Open Source)
      2> WinRunner/Vugen (from HP/Mercury)
      3> Rational Tester (from IBM)

      Pasting a sample below. For a bandwidth of 6291Kbps, latency 45ms and loss = 0.001
      -------------------------------------------------------------------------------------------
      POST /WANem/index-advanced.php HTTP/1.1

      Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-silverlight, */*

      Referer: http://192.168.140.148/WANem/index-advanced.php

      Accept-Language: en-us

      Content-Type: application/x-www-form-urlencoded

      UA-CPU: x86

      Accept-Encoding: gzip, deflate

      User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; InfoPath.2)

      Host: 192.168.140.148

      Content-Length: 558

      Connection: Keep-Alive

      Cache-Control: no-cache

      Cookie: PHPSESSID=d7eb54e16253d6240ef10a0006958bd8

      txtLimit1=1000&selSym1=Yes&txtBandwidthAuto1=6291&txtBandwidth1=0&txtDelay1=45&txtLoss1=0.001&txtDup1=0&txtReorder1=0&txtCorrupt1=0&txtDelayJitter1=0&txtLossCorrelation1=0&txtDupCorrelation1=0&txtReorderCorrelation1=0&txtDelayCorrelation1=0&txtGap1=0&selDelayDistribution1=-N%2FA-&selidtyp1=none&txtidtmr1=&txtidsctmr1=&selrndtyp1=none&txtrndmttflo1=&txtrndmttfhi1=&txtrndmttrlo1=&txtrndmttrhi1=&selrcdtyp1=none&txtrcdmttflo1=&txtrcdmttfhi1=&txtrcdmttrlo1=&txtrcdmttrhi1=&txtSrc1=any&txtSrcSub1=&txtDest1=any&txtDestSub1=&txtPort1=any&btnApply=Apply+settings
      -------------------------------------------------------------------------------------------

      Hope this helps,

      Regards,
      M.K.Nambiar

       
    • Fred Stakem
      Fred Stakem
      2008-03-17

      Has anyone done remote scripting within code. I need to run some emulation tests and want to automatically change the emulator within c#.

       
    • M K Nambiar
      M K Nambiar
      2008-03-20

      I havent tried using c# myself. But is should be very simple.

      To do this in C# one option is to use the C# HTTP API to send a POST request with the parameters as given in my earlier mail on thic topic

      If you have msdn setup you can use the C# HTTP API URL -
      ms-help://MS.MSDNQTR.v80.en/MS.MSDN.v80/MS.WIN32COM.v10.en/http/http/http_api_functions.htm

      Hope this helps.

      Regards,
      M.K.Nambiar

       
    • Victor
      Victor
      2008-06-25

      Hello,

      I have same problem, if not more.

      I need to boot wanem on a headless computer, and have it come up with dhcp and predefined configuration without interaction.

      Also, after booting, I need to be able to change settings dynamically/on the fly (bandwidth, latency, packet loss, etc).

      I am using 1.2.1.

      Has anyone a verified solution?

      Thanks,
      Victor