This blog is a knowledge base...where I clip cool tricks and urls

UDP Client Server

//Create an instance of UdpClient.
UdpClient udpClient = new UdpClient(serverName, SAMPLEUDPPORT);
Byte[] inputToBeSent =
new Byte[256];
inputToBeSent = System.Text.Encoding.ASCII.GetBytes(whatEver.ToCharArray());
IPHostEntry remoteHostEntry = Dns.GetHostByName(serverName);
IPEndPoint remoteIpEndPoint =
new IPEndPoint(remoteHostEntry.AddressList[0], SAMPLEUDPPORT);
int nBytesSent = udpClient.Send(inputToBeSent, inputToBeSent.Length);
Byte[] received =
new Byte[512];
received = udpClient.Receive(
ref remoteIpEndPoint);
String dataReceived = System.Text.Encoding.ASCII.GetString(received);
 blog it

UDP packet - Ask DNS

clipped from
Test Application
 blog it

MIB Overview

 blog it

SNMP Library Free Project (Mono)

I started this project because of the lack of resources for the older, but still highly
used SNMP protocol. The SNMP protocol still remains the de facto standard when it comes
to network monitoring and management.

 blog it

IDataProvider - Implement Provider Model C#

In the CreateDataAdapter method you will have to do a couple of things to create an instance of a specific data adapter. First you will need to initialize the appropriate provider based on the information in the configuration file. The InitProvider method is responsible for this and will be shown in the next section. After the appropriate DataProvider class is loaded the CreateDataAdapter method on that specific provider will be called. This is where the SqlDataAdapter or the OleDbDataAdapter or the OracleDataAdapter is created.
public static IDbDataAdapter CreateDataAdapter(
 string SQL, string ConnectString)
  IDbDataAdapter da;

  // Make sure provider is created

  da = DataProvider.CreateDataAdapter();

  da.SelectCommand = CreateCommand(SQL, 
   ConnectString, false);

  return da;

In Visual Basic

 blog it


clipped from

A TCP segment consists of two sections:

  • header

  • data

The TCP header[2] consists of 11 fields, of which only 10 are required. The eleventh field is optional (pink background in table) and aptly named "options".

TCP Header
Bit offsetBits 0–34–78–1516–31
0Source portDestination port
32Sequence number
64Acknowledgment number
128ChecksumUrgent pointer
160Options (optional)

  • Source port (16 bits) – identifies the sending port
 blog it

TCP diagram

clipped from
 blog it

MSI parameter driven

clipped from

Adding msi parameters in Visual Studio Setup Project

I can’t find how and where to add the parameter list of the msi.

I had to modify a setup project of which creates an msi for an application.

During modification I had to add an extra parameter that should be given to the msi during installation.

While I searched I found only how to read the parameters supplied from command line using Context.Parameters.

But I can’t find at any place where to specify the parameters those can be supplied with msi. Finally I found it and so I am writing here as it may be useful to others.

In property Pages of Install, in the option CustomEvents, we can specify the arguments.


For example if for our msi, we have to add 2 parameters INSTLOG & X

Then in the CustomEvents, we have to specify it as:

            /INSTLOG=”[INSTLOG]” /X=”[X]”

 blog it