Search:

Type: Posts; User: wyliek

Search: Search took 0.00 seconds.

  1. Replies
    4
    Views
    7,976

    Hi knh, I thought a TUN/TAP was a virtual...

    Hi knh,

    I thought a TUN/TAP was a virtual ethernet interface driver. So in my basic understanding, a TUN/TAP, instead of receiving packets from a physical
    media, receives them from user space...
  2. Replies
    4
    Views
    7,976

    Hi Mats, You are correct. By "external" I...

    Hi Mats,

    You are correct. By "external" I mean, non kernel. Provided by a third party. Our customer does not want to use the linux stack. They have implemented their own stack that they want us to...
  3. Replies
    4
    Views
    7,976

    TCP/IP stack bypass

    Hi there,

    I have an embedded device running linux which has 2 ethernet interfaces (eth0, eth1).

    I need to decouple the linux tcp/ip stack from eth1 so that I can access the drivers for this...
  4. From wikipedia: "Thread safety is a computer...

    From wikipedia:
    "Thread safety is a computer programming concept applicable in the context of multi-threaded programs. A piece of code is thread-safe if it functions correctly during simultaneous...
  5. Replies
    13
    Views
    8,821

    Please clarify what you requirements are. What is...

    Please clarify what you requirements are. What is the largest and smallest number you will need to represent. And what is the precision you need? I see you are an engineering student so you should...
  6. Thread: sum

    by wyliek
    Replies
    21
    Views
    3,639

    There is no array in your code. An array looks...

    There is no array in your code. An array looks like this:
    numbers[index]

    Can you elaborate please? What do you mean by array?
  7. Replies
    7
    Views
    7,783

    It looks like the timestamp struct is...

    It looks like the timestamp struct is un-initialized or has been written to incorrectly. It just seems to be a block of 0x20202020202020

    try initializing the values to some other pattern, then...
  8. Replies
    7
    Views
    7,783

    can you show your code that assigns to the time...

    can you show your code that assigns to the time struct and read back from it?
  9. Thread: sum

    by wyliek
    Replies
    21
    Views
    3,639

    it should really be sum/(num1 - num +1) as...

    it should really be
    sum/(num1 - num +1)

    as you are including the boundary numbers

    EDIT: or you could do:


    int count = 0;
    for (; num<=num1; num++)
  10. Replies
    31
    Views
    2,867

    I think your problem is that you are using ...

    I think your problem is that you are using

    char *b3_dn;

    instead of:

    unsigned char *b3_dn;


    this means when you do the compare:
  11. Replies
    17
    Views
    51,324

    I have worked with a few of those. They tend not...

    I have worked with a few of those. They tend not to last to long unless they move into marketing
  12. Replies
    8
    Views
    2,725

    thanks for pointing those out

    thanks for pointing those out
  13. Replies
    17
    Views
    51,324

    If they choose to cheat it's not my problem....

    If they choose to cheat it's not my problem. Neither is the bug

    edit: Which seems to be that the function will not work for in input of 2. Note that there are at least 2 more bugs on top of this
  14. Replies
    8
    Views
    2,725

    You should learn to use while, for and do while...

    You should learn to use while, for and do while loops.
    You really, really should learn to indent your code properly. I did not even try looking at your code because it is too ugly and difficult to...
  15. Replies
    17
    Views
    51,324

    so in essence what you are looking for is: ...

    so in essence what you are looking for is:



    #define MAX 1000
    int primeNum(int num)
    /* will see if a number between 1 and 1000*/
    /* (inclusive) is prime or not */
    {
    int i, num_root;
  16. Thread: Next question

    by wyliek
    Replies
    16
    Views
    2,666

    First you should read up on how strings are...

    First you should read up on how strings are handled in C.
    eg:
    http://www.cs.cf.ac.uk/Dave/C/node19.html
    http://www.exforsys.com/tutorials/c-...ings-in-c.html
    once you understand strings then:
    ...
  17. Thread: Next question

    by wyliek
    Replies
    16
    Views
    2,666

    when you declare: char selection[2] selection...

    when you declare:
    char selection[2]

    selection consists of two bytes. They each could have any value. You should initialize them first before checking:

    while (strcmp(selection,"Q")!=0)
  18. Replies
    5
    Views
    1,743

    There are a multitude of ways to do this. First...

    There are a multitude of ways to do this. First you should read up on how strings are handled in C.
    eg:
    http://www.cs.cf.ac.uk/Dave/C/node19.html...
  19. Replies
    5
    Views
    1,370

    Thanks for the info. So heres the revised example...

    Thanks for the info. So heres the revised example which contains both the c method and the c++ file stream method:


    #define USE_STREAMS

    enum sex {male, female};
    struct data
    {
    char...
  20. Replies
    5
    Views
    1,370

    This will work. I don't know how to do it using...

    This will work. I don't know how to do it using c++ streams though. You have to open the file in binary mode and read a chunk of data the size of your structure. If you pass fread() a pointer to your...
Results 1 to 20 of 20