Ask Experts Questions for FREE Help !
Ask
    mehdi's Avatar
    mehdi Posts: 1, Reputation: 1
    New Member
     
    #1

    Aug 1, 2003, 05:54 PM
    C programming
    I need some help from you regarding a particular problem.

    I am using libnet raw packet library (libnet_build_ethernet) for
    transferring data over the network. For this, I have to first convert
    all the data to u_char type and then serialize them to contiguous memory
    locations.

    Can anyone of you give me an idea how can I do that. I tried with
    something like following piece of code -

    ----------------------------------------------------------
    char *a;
    char *b;
    char *c;
    char *payload;

    struct test{
    int a;
    int b[2];
    int c;

    }test1;


    test1.a = 5;
    test1.b[0] = 6;
    test1.b[1]= 7;
    test1.c = 8;

    a = (char *)&test1.a;
    b = (char *)&test1.b;
    c = (char *)&test1.c;

    printf("%p %p %p\n", a, b, c);

    *payload = *a;
    *payload+1 = *b;
    *payload+3 = *c;

    //printf("%p %p %p %p\n", payload,a, b, c);
    ----------------------------------------------------------------

    but I come down with some problem like __dereferencing_frame_info (I
    don't know what does that mean, I am pretty new in this area.).

    Any help is greatly appreciated.

    Regards
    kave's Avatar
    kave Posts: 7, Reputation: 1
    New Member
     
    #2

    Nov 13, 2003, 08:19 AM
    C programming
    Salam:
    Khoshhalam ke ye hamzaboon inja mibinam damet garm


    Chakeret
    GeethaShankar's Avatar
    GeethaShankar Posts: 1, Reputation: 1
    New Member
     
    #3

    Jan 14, 2009, 10:28 PM

    how to prepare pi chart in c language

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

C programming [ 2 Answers ]

I'll be extremely thankful if u could provide me with a c program that convert a given nfa to dfa

Qt programming [ 1 Answers ]

Hi, My name is anshahmed.I am doing final year B.TECH.Now I am doing a project and I want to use qt programming .Whie I was compiling the qt programm the compiler giving errors in header file(qpplicaton.h) .how can I compile the qt programm.

C programming help [ 1 Answers ]

Hi people I want to shut down my system after a specified time I want to use the time() method but I need to know the exe file that runs after the specified time. Please let me know also if there is any other way to shut down my system after some particular time Thank you Best regards


View more questions Search