Compute Checksum Function
Please visit: http://aimslife.com/blog/?p=27

Filed under: C/C++ | Leave a Comment
Specification of Pakistan Flag
Please visit: http://aimslife.com/blog/?p=25
Filed under: Uncategorized | Leave a Comment
Tags: Flag, Pakistan
Please visit: http://aimslife.com/blog/?p=23
Filed under: C/C++, DDK, Linux, Windows | Leave a Comment
Tags: C/C++, DDK, Linux, Windows
Please visit: http://aimslife.com/blog/?p=20
Filed under: C/C++, Linux, Windows | Leave a Comment
Tags: itoa, sprintf
14-Aug Pakistan Zindabad!
Express your feeling with actions.
پاکستان ایک عشق ایک جنوں
Pakistan Zindabad!

Filed under: Uncategorized | Leave a Comment
اندیشہ زوال
تلاش کرتا ہو خود میں ایسا جذبہ جسے اندیشہ زوال نہ ہو
مگربہت تلاش پر بھی نہ ملا جس پر یہ سوال نہ ہو
By AimsLife
Filed under: fun & enjoy | Leave a Comment
Tags: Urdu
Please visit: http://aimslife.com/blog/?p=6
Filed under: C/C++, Linux, Network | Leave a Comment
Tags: Linux Kernel Module Programming Netfilter SK_Buff
Please visit: http://aimslife.com/blog/?p=7
Filed under: C/C++, DDK, Network, WDF, WDK, Windows | Leave a Comment
Tags: DDK WDK WDF NDIS
Please visit: http://aimslife.com/blog/?p=8
Filed under: Linux, Network, fun & enjoy | Leave a Comment
Tags: network connection netstat lsof command linux
Please visit: http://aimslife.com/blog/?p=18
Filed under: C/C++, DDK, Network, WDF, WDK, Windows | Leave a Comment
Tags: NDIS_PACKET WDK DDK NDIS
Given code can help you to compute checksum.
/* pseudo header for checksum calculation */
typedef struct pseudoh {
guint32 src_addr;
guint32 dest_addr;
guint8 zero;
guint8 protocol;
guint16 length;
} PSEUDO_HDR, * PPSEUDO_HDR;
/* Compute Checksum for TCP packets */
GUINT16 ComputeChecksum(PGUINT16 pseudo_hdr, PGUINT16 ptcp_hdr, PGUINT16 pdata, GUINT32 dataSize) {
guint32 checksum = 0;
guint32 nleft = 0;
nleft = SIZE_PSEUDO_HDR;
while(nleft > 1) {
/* This is the inner loop */
checksum = checksum + *(pseudo_hdr++);
nleft = nleft – sizeof(guint16);
}
nleft = SIZE_TCP_HEADER;
while(nleft > 1) {
/* This is the inner loop */
checksum = checksum + *(ptcp_hdr++);
nleft = nleft – sizeof(guint16);
}
nleft = dataSize;
while(nleft > 1) {
/* This is the inner loop */
checksum = checksum + *(pdata++);
nleft = nleft – sizeof(guint16);
}
if(nleft)
checksum = checksum + *((pguint8)pdata);
/* Fold 32-bit sum to 16 bits */
checksum = (0xFFFF&(checksum >> 16)) + (checksum & 0xffff);
checksum = (checksum & 0xffff) + (0xFFFF&(checksum >> 16));
return (guint16)(~checksum);
}
Filed under: C/C++, Java, Linux, Network, WDF, WDK | Leave a Comment
Tags: Checksum TCP
Pakistan Win! الله اکبر

Filed under: Blogroll, News, fun & enjoy | Leave a Comment
Tags: Pakistan Win ICC Twenty20 World Cup 2009
This setting will enables for you to control automatic rebooting of the system after the crash. After the crash, you must be able to check the reason of the crash and for that, the system should not reboot. Therefore, it is very necessary to control the automatic rebooting of the system.
Path: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl\]
Location: Local Machine
Value Name: AutoReboot
Data Type: DWORD (DWORD Value)
Enabled Value: 0
Disabled Value: 1
Action Type: Modified
Filed under: C/C++, DDK, Network, WDF, WDK, Windows, fun & enjoy | Leave a Comment
Tags: reboot WDK DDK system crash
While working on Microsoft Device Driver domain, I found following most active and helpful forums,
1) OSR-Online: http://www.osronline.com
You can configure OSR-Online forum on email client and given client will be helpful for you.
http://www.osronline.com/page.cfm?name=NewsReaderInfo
2) Microsoft NNTP Server: msnews.microsoft.com
Following groups are available on Microsoft forum,
1. microsoft.public.development.device.drivers
2. microsoft.public.windowsxp.device_driver.dev
You can configure Microsoft NNTP server on email-client using above “OSR-Online Forum Configuration” process but you will use “msnews.microsoft.com” for Microsoft NNTP Server address. You will not need authentication cardinality to connect Microsoft NNTP Server.
NOTE: Some time few consultants will discourage you to use forums for help and will ask you to get consultancy from them. Please do not underestimate yourself and try google and other forums for help because “Everything possible but nothing is impossible”.
Filed under: C/C++, DDK, Network, News, WDF, WDK, Windows | Leave a Comment
Tags: NNTP
I faced given compilation error after convert “Komodia Project” from “VC6” to “VS2K5”.
Error 1 Command line error D8004 : ‘/D’ requires an argument cl
Solution:
Remove “/D” from “Additional options” (Example image is given below).
Path of “Additional options” is “Project Properties” >> “Configuration Properties” >> “C/C++” >> “Command Line”

Filed under: C/C++, Network, Windows | Leave a Comment
Tags: Network LSP Komodia Winsock2
Please visit: http://aimslife.com/blog/?p=11
Filed under: C/C++, DDK, WDF, WDK, Windows | Leave a Comment
Tags: WDK WDF C/C++ DDK Windows
Please visit: http://aimslife.com/blog/?p=9
Filed under: C#, C/C++, Java, Linux | Leave a Comment
Tags: http://aimslife.com/blog/?p=9
# synergyc –f –d ERROR –daemon <server_ip_address>
I recommend to add this command on “/etc/rc.local” file for automatic start synergy client at login time.
[Synergy]
Filed under: Linux | Leave a Comment
For uninstall/repair Windows Live Messenger 2009, you have to use "Windows Live Essentials" from “Add/Remove Programs”. Image will help you a lot.

Filed under: Windows | 1 Comment
Tags: MSN Uninstall Repair Live 2009
Windows Live Writer – Test Blog
This is my first blog testing with "Windows Live Writer". Download information is given blow,
[Download link]
It has cool interface and good option for Blog Writing…
Filed under: Uncategorized | 1 Comment
Command:
# find -name .svn -exec rm -rf {} \;
OR
# find -name “\.svn” -exec rm -rf {} \;
Filed under: Linux | Leave a Comment
Pakistan Zindabad…

“Do your duty and have faith in God. There is no power on earth that can undo Pakistan. It has come to stay InshAllah.”
(Quid-e-Azam)
Filed under: Uncategorized | Leave a Comment
WebServer in Java
package com.Web;
import java.io.*;
import java.net.*;
public class WebServer extends Thread {
String filePath;
OutputStream out;
Socket sock;
public WebServer(String pathString, OutputStream outStream, Socket s) {
filePath = pathString;
sock = s;
out = outStream;
}
public void run() {
PrintWriter writer = new PrintWriter(out, true);
try {
filePath = (new File(filePath)).getAbsolutePath();
InputStream in = new FileInputStream(filePath);
int val;
writer.println(“HTTP/1.0 200 OK”);
writer.println(“”);
System.out.println(“<Client> Uploading : ” + filePath);
while ((val = in.read()) != -1) {
out.write(val);
}
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
writer.println(“<html><body><b>” + e.getMessage()
+ “</b></body></html>”);
System.out.println(“<Client> ” + e.getMessage());
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
writer.println(“<html><body><b>” + e.getMessage()
+ “</b></body></html>”);
System.out.println(“<Client> ” + e.getMessage());
}
writer.println(“”);
System.out.println(“<Client> Uploading : Complete”);
System.out.println(“<Client> “);
try {
sock.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
System.out.println(“ERROR: ” + e.getMessage());
}
}
public static void main(String[] args) throws Exception {
ServerSocket server = new ServerSocket(80);
while (true) {
Socket s = server.accept();
OutputStream out = s.getOutputStream();
InputStream in = s.getInputStream();
InputStreamReader inReader = new InputStreamReader(in);
BufferedReader reader = new BufferedReader(inReader);
String line = reader.readLine();
while (line != null && !”".equals(line)) {
System.out.println(“<Client> ” + line);
String splitString[] = line.split(” “);
if (splitString[0].equals(“GET”)) {
WebServer webServer = new WebServer(“.” + splitString[1],
out, s);
webServer.start();
}
line = reader.readLine();
}
System.out.println(“<Client> “);
}
}
}
It is your duty to compile and make it working condition… use JDK1.6 and eclipse…
Filed under: Java | Leave a Comment
Recent Entries
- Compute Checksum Function
- Specification of Pakistan Flag
- How make debugging levels and enable/disable in C language?
- How to convert integer value into character string?
- 14-Aug Pakistan Zindabad!
- اندیشہ زوال
- Linux Kernel Driver with NetFilter
- How we can use malloc, free, new and delete functionality in DDK?
- Linux command to operate network connections
- How to generate new copy of NDIS_PACKET?
- How to compute checksum for TCP packets?
Categories
- Blogroll (1)
- C# (5)
- C/C++ (23)
- DDK (6)
- FireFox (6)
- fun & enjoy (10)
- Java (6)
- Linux (11)
- Network (8)
- News (3)
- Rotor [Microsoft] (1)
- Uncategorized (20)
- WDF (6)
- WDK (6)
- Windows (10)




