Programming :: Create Own Packet In NS2?
Apr 14, 2011I want to create my own packet for aodv so how can i do? from where i should start?
View 2 RepliesI want to create my own packet for aodv so how can i do? from where i should start?
View 2 RepliesHow can we build a packet using C?we have a structure called sockaddr_in which is use to for IPv4,so that we can define address,port and etc in this way:
Code:
struct sockaddr_in sock;
sock.sin_family=AF_INET;
[code]...
I want to develop program to put (tunnel) sniffed packets into another packet, i already have sniffer code to capture packet, can some one give me use full site or simple code to do that.
View 3 Replies View RelatedI am the new user to ns-2. I would like to know is it possible to send the keys or some value as the packet data (content of the packet) in ns-2 (for wireless environment).
View 1 Replies View RelatedI got a problem with my CentOS server. Somebody told me OpenVPN Requires different changes inside my firewall settings. That could be the problem why openvpn wont load..I receive this error on my CentOS panel when im trying to connect into the centos openvpn (with my winxp pc):
Thu Sep 17 20:31:36 2009 TLS Error: incoming packet authentication failed from 84.xx.62.122:2622
Thu Sep 17 20:31:38 2009 Authenticate/Decrypt packet error: packet HMAC authentication failed
Thu Sep 17 20:31:38 2009 TLS Error: incoming packet authentication failed from 84.xx.62.122:2622
[code]....
I want to access the timestamp field of the packet being sent or received. I am not getting clear idea as to which ioctl I should use, and how it should be used in the program. Anyone explain rough flow of the program for accessing the timestamp.
View 5 Replies View RelatedI'm a newbie trying to modify a DNS-formatted UDP packet. I am piping DNS replies through a firewall queue where I get the packet with $udp_obj->data provided by NetPacket::UDP. Is there a command line application that will break down the udp packet for me so I can extract an answer? Cpan doesn't have a module to do this. One can *create* udp packets programmatically or get them off of libpcap, but I don't need either.
View 7 Replies View Relatedi'm sniffing network packets with pcap in ubuntu, i need to save these packets somewhere in the memory and after a while read ans send them. how can i do this?
View 1 Replies View RelatedCan someone help me with this problem,trying to send a packet,using tcp/ip,the packet should look like this:
Code:
field 1: SOCKS protocol version, 1 byte (0x05 for this version)
field 2: status, 1 byte:
0x00 = request granted
0x01 = general failure
0x02 = connection not allowed by ruleset
0x03 = network unreachable
0x04 = host unreachable
0x05 = connection refused by destination host
0x06 = TTL expired
0x07 = command not supported / protocol error
0x08 = address type not supported
field 3: reserved, must be 0x00
field 4: address type, 1 byte:
0x01 = IPv4 address
0x03 = Domain name
0x04 = IPv6 address
field 5: destination address of
4 bytes for IPv4 address
1 byte of name length followed by the name for Domain name
16 bytes for IPv6 address
field 6: network byte order port number, 2 bytes
and this is my code:
Code:
int domainLen = strlen(domain);
char reply[domainLen + 7];
reply[0] = 5; // version
reply[1] = 0; // succed
reply[2] = 0; // reserved
reply[3] = 3; // its a domain
reply[4] = domainLen;; // lenght of domain
for(int j = 0; j < domainLen; ++j)
{
reply[j + 5] = domain[j];
}
reply[5 + domainLen] = 80; // port
reply[20] = '�';
Send(reply, sizeof(reply));
domain is "www.google.com". Am I doing it right ? I dont know much about bits.
writing a code in C program for debugging error and sendingror messagein routingprotocols. please answer with code
View 2 Replies View RelatedI wanna capture network packets from DMA ring buffer, just like netfilter. i wanna capture it from DMA, because i wanna get MAC address of I/O packets, so netfilter not included MAC address of out going packets because its on IP level and Ebtables is like that too. how i can capture network packets from DMA ring buffer.
View 9 Replies View RelatedI want to receive an icmp packet using net filter hook function. A string will be printed if an icmp packet is received.I am able to print the string. but the packet loss in the log message shows 100%packet loss.So i changer hooknum = NF_IP_FORWARD.but still its not working.I want to get log message as received 100%
View 1 Replies View RelatedI am trying to generate a UDP syslog packet from my C application. But I am facing a problem with a Cisco Router ACE that does not like the Source Port being '0' and thus drops the packet.How can I specify the Source Port in the UDP header to '514' as stated in RFC3164 (Section 2: Transport Layer Protocol)? "It is RECOMMENDED that the source port also be 514 to indicate that the message is from the syslog process of the sender"
View 1 Replies View RelatedI'm beginning to write a custom RTP implementation and want to test its resilience to UDP traffic. I've searched on the web and all the links I can find are for analysing actual traffic, not generating it or messing it up.
Does anyone know of any software (preferably free software) that will, for example, take actual UDP traffic and drop packets, duplicate some and make some arrive late/out of sequence?
I have found many examples out on the www for creating udp servers with sockets. The problem I am running into is after I receive the packet from a host I need to be able to send a custom made packet(I'm using RawIP / NetPacket to make my packet) back to this host. The only way to do this is seemingly through the send() function. This function however doesn't appear to allow me to specify which host to send my packet to.
View 2 Replies View RelatedI'm working on an application that makes http requests using HttpRequest and it's been doing what I need so far without a problem. Now I need to make https requests as well and when I try to make the request, i get this error message:
Code:
Fatal error: Uncaught exception 'HttpInvalidParamException' with message 'Empty or too short HTTP message: ''' in /home/antoranz/waneesia/html/index.php:0 inner exception 'HttpRequestException' with message 'SSL connect error; gnutls_handshake() failed: A TLS packet with unexpected length was received. (https://www.paypal.com/)' in /home/antoranz/waneesia/html/index.php:104 Stack trace: #0 /home/antoranz/waneesia/html/index.php(0): HttpRequest->send() #1 {main} thrown in /home/antoranz/waneesia/html/index.php on line 0
What's going on?
The project: url
i got to build my own linux shell for my project
View 5 Replies View Relatedim trying to build my own tablet computer. my original idea was to build the os from scratch but then i thought it would be easyeir to build a GUI on top of a linux os. the idea would be that it would be linux in esance but would boot into my gui instaed of ubunto or fedora or something. the problem is i cant find any tools that i could do this with. I found sites that say i can create my own distro but they turn out to only do things like preinstall software. i realy want something that basicly lets me remake the GUI. I have limeted knowlodge of linux but i have programed games and software before. any tips or programing environments are welcome.
View 1 Replies View RelatedI'm currently working on my graduation project and have chosen to strip a Ubuntu version of Linux and customize it.I downloaded the LFS book and have started reading it, I'm really just looking to create a new Man or at least rename it and create some commands for it. Also I'm looking to create a new Gui theme with some custom icons.
View 3 Replies View RelatedHow i do create GUI for my sh-script
View 5 Replies View Relatedcan any body tell me how to creat a log file in linux...when i run the script the details must go to log file...
View 8 Replies View RelatedHow would I create a sed or awk command that would add a | to the end of a line if it wasn't already there? I'm trying to import some files into mysql, but some of the lines to not end with a | which is my field delmiter.
View 14 Replies View RelatedI take responsibility for data backup my centos server. Please help me backup data using tar. following scenario:- Sunday - full backup- the rest of differential backup.We're back up to full as follows:tar-cvzf / backup / backup-date.tar.gz / data
View 6 Replies View RelatedI am using NetBSD-5.1.1. I wanted to know what happens internally when we create a file in linux. ( In general )?The header file STDIO.H present in "src/include/stdio.h" contains a "FILE" structure with various members like _p, _cookie, etc.2. I wanted to know how does internally memory gets allocated for them.?
View 1 Replies View Relatedi did this code:
reads 1 matrix 2x2 and print!
Code:
# include <stdio.h>
int main()
{
int t, i, M[2][2];
int big[2];
[Code]....
Now i want to create 2 vectors:
1 vector: has the biggest number of every line on the matrix
2 vector: has the lowest number of every column on the matrix
I want to create 3D animation and also make some big programs. Is python capable of that? or should I stick to C++?
View 3 Replies View RelatedI am customizing the CentOS and I want to change the complete look and feel of the OS. I know all the installation wallpapers and images comes from the rpm mentioned above.
Even I extracted the said rpm using rpm2cpip and have replaced the my customized images but not sure how can I prepare my new RPM to include that in a my build.
Does any have any clue or I should go for src.rpm?
i want create a phpfile from script.
i tried 2 ways, but both give the error, permission denied
way one:
cat > /var/www/phpinfo.php << "EOF"
<?php phpinfo(); ?>
EOF
(also if i did
[Code]....
So I was reading one of the Unix Philosophy rules by Eric Raymond:# Rule of Composition:Design programs to be connected to other programs.How does one achieve that? I know one could several C programs and then use a bash script to feed in the stdin, but how do you do that with just pure C, do you do it with pipelines?
View 2 Replies View RelatedI`ve just installed opensuse 11.4 and i dont know how to write and compile my programs
is there a compiler like turbo c++ to use??