icmp.h Source File

Main Page Class Hierarchy Compound List File List Compound Members Examples

# icmp.h

    00001 /*** This Programs/Libraries are (C)opyright by Sebastian Krahmer.
    00002  *** You may use it under the terms of the GPL. You should have
    00003  *** already received the file COPYING that shows you your rights.
    00004  *** Please look at COPYING for further license-details.
    00005  ***
    00006  *** THERE IS ABSOLUTELY NO WARRANTY. SO YOU USE IT AT YOUR OWN RISK.
    00007  *** IT WAS WRITTEN IN THE HOPE THAT IT WILL BE USEFULL. I AM NOT RESPONSIBLE
    00008  *** FOR ANY DAMAGE YOU MAYBE GET DUE TO USING MY PROGRAMS.
    00009  ***/
    00010
    00011 #ifndef _ICMP_H_
    00012 #define _ICMP_H_
    00013
    00014 #include "usi-structs.h"
    00015 #include "datalink.h"
    00016 #include "ip.h"
    00017
    00018 namespace usipp {
    00019
    00020
    00027 class ICMP : public IP {
    00028 private:
    00029         struct icmphdr icmphdr;
    00030 public:
    00033         ICMP(const char*);
    00034
    00035         virtual ~ICMP();
    00036
    00038         ICMP(const ICMP &);
    00039
    00041         ICMP &operator=(const ICMP &);
    00042
    00046         virtual int sendpack(void*, size_t);
    00047
    00050         virtual int sendpack(char*);
    00051
    00055         virtual int sniffpack(void*, size_t);
    00056
    00062         virtual int init_device(char *, int, size_t);
    00063
    00066         int set_type(u_int8_t);
    00067
    00070         int set_code(u_int8_t);
    00071
    00074         int set_icmpId(u_int16_t);
    00075
    00078         int set_seq(u_int16_t);
    00079
    00080         int set_gateway(u_int32_t);
    00081
    00082         int set_mtu(u_int16_t);
    00083
    00086         u_int8_t get_type();
    00087
    00090         u_int8_t get_code();
    00091
    00094         u_int16_t get_icmpId();
    00095
    00098         u_int16_t get_seq();
    00099
    00100         u_int32_t get_gateway();
    00101
    00102         u_int16_t get_mtu();
    00103 }; // class ICMP{}
    00104
    00105
    00106
    00107 } // namespace usipp
    00108 #endif // _ICMP_H_