*
============================================================================
Name : projektC.c
Author :
Version :
Copyright : Your copyright notice
Description : Hello World in C, Ansi-style
============================================================================
*/
#include <stdio.h>
#include <stdlib.h>
#include "program_lib.h"
#include <dlfcn.h>
#include <netinet/in.h>
#include <netinet/ip6.h>
int main (void) {
void * Ipv6_lib = malloc(sizeof (void));
void * Icmp6_lib = malloc(sizeof (void));
char input [32];
int *count = malloc (sizeof (int));
struct ip6_hdr *iphdr;
unsigned char *datagram;
unsigned char * (*ipv6) () = malloc (sizeof (unsigned short *));
void (*icmp6) (unsigned char *) = malloc (sizeof (void));
datagram = malloc (sizeof (unsigned char *));
Ipv6_lib = LoadIpv6();
ipv6 = dlsym(Ipv6_lib, "CreateIPV6Packet");
datagram = (*ipv6)();
iphdr = (struct ip6_hdr *) datagram;
if ( iphdr->ip6_ctlun.ip6_un1.ip6_un1_nxt == IPPROTO_ICMPV6){
Icmp6_lib = LoadIcmp6();
icmp6 = dlsym(Icmp6_lib, "CreateICMP6Packet");
(*icmp6) (datagram);
}
printf ("How many packets do you want to send?");
fgets (input, 32, stdin);
*count = atoi(input);
LoadToList( count, datagram );
SendPacket(datagram);
EXIT_SUCCESS;
}
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}