How to enable AnkhSVN on Visual Studio 2013?

Gallery

I would like to set up WinMerge as external Diff and Merge Tools after setting the source control plug-in (you have to install WinMerge first): Visual Studio -> TOOLS -> Options -> Expand the “Source Control” Node Double click on … Continue reading

Proxy setting for wget command using terminal

Gallery

You can give proxy parameters while use wget command in linux. Here is command for proxy parameters, $ wget -e use_proxy=yes -e http_proxy=192.168.1.10:8080 <download_URL> You can use https_proxy and/or ftp_proxy variable as per need in wget command instead of http_proxy … Continue reading

Standalone Single Instance in Linux

Gallery

Given code will help to create standalone single instance of application in Linux operating system. #include <stdio.h>#include <semaphore.h>#include <fcntl.h> int main(){    const char sem_name[] = “tmp”;    sem_t * mutex;     printf(“semaphore application started!\n”);    mutex = sem_open(sem_name, O_CREAT | O_EXCL, 0600, … Continue reading

Incremental Linking (LNK1123) error in VS2010 while building project

Gallery

Question: What is Incremental Linking in Visual Studio 2010? Answer: Please study given link to understand Incremental Linking in visual studio 2010.[Link] http://msdn.microsoft.com/en-us/library/4khtbfyf(v=vs.100).aspx Question: How error looks like while building project on visual studio? Answer: Build error will be looks … Continue reading

How to setup “libpcap” environment on Ubuntu

Gallery

Following steps will be required to prepare libpcap environment on Ubuntu. Download “libpcap” file from http://www.tcpdump.org/release/libpcap-1.3.0.tar.gz Use following commands sequentially to install “libpcap” package, $ sudo ./configure – prefix=/usr && make $ sudo make install In case, you faced problem … Continue reading

Compute Checksum Function

Gallery

unsigned short ComputeChecksum(unsigned short *data, int size) {     register int nleft=size;     unsigned long checksum = 0;     while(nleft>1)     {         checksum=checksum+*data++;         nleft=nleft-sizeof(unsigned short);     }     if(nleft)         checksum=checksum+*(unsigned char*)data;     checksum=(checksum>>16)+(checksum&0xffff);     checksum=checksum+(checksum>>16);     return … Continue reading

Linux command to operate network connections

Gallery

Following commands can give network connections information, # netstat -tulpan # lsof –i Command#1 (netstat –tulpan) will give you connections information, but I did not find any way to kill connection after get information from it. Command#2 (lsof –i) will … Continue reading

How to generate new copy of NDIS_PACKET?

Gallery

Given code is working perfect to generate new copy of NDIS_PACKET, NDIS_STATUS CreateNewSendNdisPacket(IN NDIS_HANDLE SendPacketPoolHandle,                         IN PNDIS_PACKET pkt_old,                         IN PGUINT8 pkt_raw,                         IN GUINT32 pkt_len,                         OUT PNDIS_PACKET * pkt_new) {   NDIS_STATUS Status;   NdisDprAllocatePacket(&Status, pkt_new, SendPacketPoolHandle); … Continue reading