Usman ur Rehman Ahmed's blog

EVDO network Interface is not listed by WireShark

Background Context

I am using EVDO broadband wireless Usb stick launched by Pakistan Telecommunication Limited (a 3.1 Mbps device). It is based on "CDMA2000" 3G wireless standard. It works well for me since I am at a rather lesser IT aware populated location. I came across an issue today while trying to capture network traffic on top of EVDO stick. I couldn't find much on this topic so I decided to write a post on this.

The Problem

I was able to get the network interface against EVDO using System.Net.NetworkInformation namespace,

foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces()) { ... }

 as following,

                "WAN (PPP/SLIP) Interface"

Evdo-interface
However this interface was not listed at all by either WireShark or by SharpPCap (which I was using to get Network Devices list) so I wasn’t able to send/receive packets. I was running on,

OS: Windows XP (x86)

with following,

WinPCap: 4.1.1

WireShark: Version 1.2.8 (SVN Rev 32676)

SharpPCap: SharpPcap-3.5.0

Solution

Since WAN (PPP/SLIP) interface is no exception I was forced to think that the issue is not due to usb modem but rather with WinPCap. I goggled it a bit and identified that PPP capturing is possible on Windows XP (x86) with WinPCap last stable release version (at the time of this writing) 3.1 which can be downloaded from,

                http://www.winpcap.org/archive/3.1-WinPcap.exe

-          I uninstalled 4.1.1 and reverted back to 3.1 and on the go, both network interfaces (Generic dialup adapter & WAN (PPP/SLIP interface) ) were listed relative to EVDO under WireShark and using SharpPCap (since it utilizes WinPCap).

Wireshark-wan-ppp-slip-interface

Note: As per initial tests, I was able to capture traffic using Wireshark but while trying to open either of these interfaces using SharpPCap, I was getting an exception at device.Open(),

"Unable to open the adapter (rpcap://\Device\NPF_GenericDialupAdapter). Error opening adapter: The system cannot find the device specified. (20)"

OR

Unable to open the adapter (rpcap://\Device\NPF_{F9409E20-55C1-43AD-992A-10929B.....}). Error opening adapter: The system cannot find the device specified. (20)

However since this post is primarily relative to listing of interfaces, the resolution was found. I will speak more on the issue of communication with EVDO device using SharpPCap in another blog post.

References

More details on the topic of PPP capturing can be found at,

                http://wiki.wireshark.org/CaptureSetup/PPP

                http://www.winpcap.org/misc/faq.htm#Q-5

Black Duck's Visual Studio's smart search plugin review for Koders

Over past few years Open Source has find the path to a platform that is proprietary in nature; Microsoft .NET umbrella and now the shift in paradigm is coming along with more open source projects hosted using .NET suite of languages. Collaborative efforts from individuals and companies are increasing open source adaption across the globe and this trend not only facilitates development for thousands of individuals but also gives birth to new dimensions and richer applications.

As part of such an effort, Koders was acquired by Black Duck two years back. This news was shared as a cover story on Linux website   (http://www.linux.com/archive/feature/133411) which is a proof how open source community welcomes such efforts. Black Duck now offers Visual Studio, Eclipse and Mozilla FireFox plug-ins/add-on for open source or enterprise code search across a pool of selected languages and configurable selected licenses. At the time of this writing you can download these from http://corp.koders.com/downloads/

The installation of plug-in for Visual Studio 2010 was pretty smooth and as soon as I did reboot Visual Studio the Black Duck window was appearing which I pinned with my solution repository. I made a basic search and found that it is returning every language as part of the search results so I had to specify the language of choice as following,

Language-selection
If there is a Black Duck personal reading this, I think it will be great if you provide context sensitive search. What I mean by that is a search similar to Visual Studio search pane: if a file is open then search relative to the language of that file (.cs, .vb) OR search relative to currently selected project type (VB, C#, etc)

Since I had seen the demo for Black Duck Visual Studio 2010 plug-in (found right here: http://corp.koders.com/downloads/demo) I was interested in finding out the accuracy of smart search but I figured out that it is not also enabled by default and can be turned on as following,

Enable-smart-search

Again, I think an image for relative language file will create a better quality product rather than Utilities.java in the smart search enable dialog box (highlighted in red in above picture).

Smart search feature lists matches as you complete a method signature while typing in real time but what about already completed methods? I think rather than going to BlackDuck box and searching explicitly, it will be good to have feature to find relative matches for all methods when loading an existing file in. (Just the way Visual Studio backend threads highlight code errors or prepare regions boundary).

Another important consideration is that the context of searches you set is not saved across multiple visual studio reloads. Take a look at this,

Black-duck-panel-reload
The add-on since makes searches on behalf of web service sometime times out with response which is not gracefully handled and shows an error on visual studio screen. To me, it would be better if in terms of timeouts, this notification dialog is never presented,

Assertion-failed

Curious in identifying what parameters were sent behind the scene; I inspected the requests using fiddler,

POST http://www.koders.com/ws/1.0/ClientServices/Default.asmx HTTP/1.1

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 4.0.30319.1)

Content-Type: text/xml; charset=utf-8

SOAPAction: "http://www.koders.com/ws/GetNumberOfSearchResults"

Host: www.koders.com

Content-Length: 513

Expect: 100-continue

 <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GetNumberOfSearchResults xmlns="http://www.koders.com/ws/"><key /><searchSpec><Terms>SendEmail</Terms><Language>C#</Language><License>*</License><SearchMode>Default</SearchMode><SearchTypeHint>MethodDefinition</SearchTypeHint></searchSpec></GetNumberOfSearchResults></soap:Body></soap:Envelope>

Search
I may intend to write down my own application on top of this web service since I don’t find any authentication or authorization, not even a pattern sequence no. that validates search is made from authenticated client (plug-in itself and not by a third party). Black Duck should introduce a sophisticated authorization in the plugin to restrict tons of vague searches. It will definitely help them refine their searches.

The plug-in has potential issues while disposing on Visual Studio close event. Everytime I close Visual Studio now, I face this error,

Visual-studio-error
This is what event viewer says about this crash,

EventType clr20r3, P1 devenv.exe, P2 10.0.30319.1, P3 4ba1fab3, P4 kodeshareaddin, P5 1.3.3974.7440, P6 4ce4ecf1, P7 af, P8 1, P9 system.objectdisposedexception, P10 NIL.

Clearly an exception on object dispose (assuming the black duck search panel dialog or the search thread object).

Overall, the idea is powerful (factilitate and reduced development effort) for end users but there are potentially many issues with black duck koder's plug-in which is only part of the cocept. The actual essence of the product lies in the serach results returned but unless the plug-in is attractive enough, black duck won't be able to make a good market out of it. I will be glad to hear your thoughts on this review.

11
To Posterous, Love Metalab