Search:

Type: Posts; User: TaiL

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    11,488

    well I don't know why i didn't have the man pages...

    well I don't know why i didn't have the man pages for inet_ntoa, but thanks tabstop. Needed to


    #include <arpa/inet.h>

    "Looks like this post is [puts on glasses] SOLVED!"

    thnx guys :D
  2. Replies
    6
    Views
    11,488

    OMG. I guess I'm missing the library for this...

    OMG.
    I guess I'm missing the library for this beast. Anyone know the quick way to get this library (coulda sworn I updated everything ubuntu9.10)
  3. Replies
    6
    Views
    11,488

    Yeah i originally had this (char...

    Yeah i originally had this


    (char *)inet_ntoa(ip_header->saddr)
    Above is a result of me guessing :\

    I get this warning if it helps:
  4. Replies
    6
    Views
    11,488

    seg_fault printing IP_header->src help

    Hey guys I am trying to print out data from an IP header however I seem to always seg fault when I try to print out the "saddr" and "daddr" from the IP Header.

    Here's what I've for the saddr...
  5. Replies
    1
    Views
    4,159

    setenv() and getenv() explained

    can someone explain to me how setenv() and getenv() work if one is executing a cgi file within a C file. [how setenv is modified/passed to the cgi file] Thanks.
  6. lol thanks. I'm beginning to hate this little...

    lol thanks. I'm beginning to hate this little program.

    edit:: oh wow my script is not a compiled script ! meaning i would have to use execl() GUH!!!

    can someone dumb down how to use execl() if...
  7. thanks. I'm still having troubles on how to...

    thanks. I'm still having troubles on how to execute my cgi script with execv() or popen(). I've read that I should be using execve() if i'm trying to execute anything with a #! but have no idea what...
  8. nvm I got it. this would work however, popen()...

    nvm I got it. this would work however, popen() seems to send the whole file instead of executing. is that the purpose of popen()?



    fwrite(p, 1, sizeof(p), fp);
  9. thanks :D that helped a lot. I'm just curious to...

    thanks :D that helped a lot. I'm just curious to see, how would you write a file pointer to another file pointer using popen()
  10. how to write to an fd instead of terminal with execv()

    Hi guys I'm trying to write to a file descriptor with execv() except instead of writing/executing where I want it, it goes straight to terminal. here's what I'm trying :



    FILE*...
  11. Replies
    15
    Views
    1,405

    I think i understood it lol. Sorry for my lack of...

    I think i understood it lol. Sorry for my lack of knowledge.



    void getExtension(char *file_name, char ext[], int size)
    {
    int i=0;
    for(i; i < strlen(file_name); i++){
    if(file_name[i] ==...
  12. Replies
    15
    Views
    1,405

    lol thanks Elysia. I thought I was done with that...

    lol thanks Elysia. I thought I was done with that function, but I guess I was wrong. Here is what I hope to be the final. ext[8] is passed in.




    void getExtension(char *file_name, char ext[])...
  13. Thread: threads & cgi

    by TaiL
    Replies
    3
    Views
    1,746

    thanks. I've been reading on the exec() family....

    thanks. I've been reading on the exec() family. Every example I've seen implements exec() with forks() is it not possible to do with a thread?
  14. Thread: threads & cgi

    by TaiL
    Replies
    3
    Views
    1,746

    threads & cgi

    Can someone point me to a tutorial on how to execute a cgi file in a c program using threads and or using system(). thanks.
  15. Replies
    15
    Views
    1,405

    Thanks guys :D void getExtension(char...

    Thanks guys :D





    void getExtension(char *file_name, char ext[])
    {
    int i=0;
    for(i; i < strlen(file_name); i++){
  16. Replies
    15
    Views
    1,405

    thanks vart for the help its much appreciated. I...

    thanks vart for the help its much appreciated. I don't understand how you don't have to loop on "j" I have fixed the local variable issue though.




    char* getExtension(char *file_name, char...
  17. Replies
    15
    Views
    1,405

    goodness me. thanks (realized I had a pointer to...

    goodness me. thanks (realized I had a pointer to a pointer to a string :\ ). I've finally got something to print out :D one last question. Can anyone tell me why my loops print out something like...
  18. Replies
    15
    Views
    1,405

    So i've cleaned it up somewhat and here's what I...

    So i've cleaned it up somewhat and here's what I have.



    char* getExtension(char *file_name)
    {

    char file = *file_name;
    printf("in getExt\n");
    char ext[8] ;
  19. Replies
    15
    Views
    1,405

    thanks guys. My apologies for the crappy code,...

    thanks guys. My apologies for the crappy code, after so many attempts at trying to figure out what was wrong i ended up with what you see above. Let me go back and refine it with all the suggestions....
  20. Replies
    15
    Views
    1,405

    I'm stuck on pointers :\

    So I'm passing a string pointer to my 'extension getter' and I am unable to dereference the string pointer back in to a string so that i can get the length of the string (using str.length() or using...
  21. Replies
    13
    Views
    6,347

    yeah i tried rb but that didn't make a...

    yeah i tried rb but that didn't make a difference. I ended up figuring it out though. Maybe you can answer why this is.

    I had to set the size of the buffer to the size of the file, instead of...
  22. Replies
    13
    Views
    6,347

    thats weird i haven't seen an example with...

    thats weird i haven't seen an example with fseek() being called in b/t fread() and fwrite()
  23. Replies
    13
    Views
    6,347

    FILE *send_file = fopen(file_name, "r");

    FILE *send_file = fopen(file_name, "r");
  24. Replies
    13
    Views
    6,347

    fread() + fwrite() not working properly

    Hi there, I am having troubles reading from a stream and writting to a stream and was wondering if someone could help me figure out whats happening.

    My test case is a .gif file which is...
  25. Replies
    22
    Views
    29,044

    Sorry, I need clarification: to nul-terminate...

    Sorry, I need clarification:

    to nul-terminate my strings i would add a '\0' at the end of message[] at every read. But how would that make a difference?




    while( (num =...
Results 1 to 25 of 103
Page 1 of 5 1 2 3 4