fcntl() and packing structs with unions.

Discussion in 'Python' started by tyler, Sep 4, 2006.

  1. tyler

    tyler Guest

    I'm having some trouble building a proper argument for an ioctl call.
    The operation I'm working with is TUNSETIFF _IOW('T', 202, int) which
    takes a struct ifreq as the arg. Could someone familiar with the
    struct (usually defined in net/if.h) tell me how the heck to encode it
    using the struct/array module? An example would be fantastic.



    Thanks
    tyler, Sep 4, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Udo Steinberg
    Replies:
    3
    Views:
    577
    Udo Steinberg
    May 15, 2004
  2. Neil Zanella
    Replies:
    1
    Views:
    448
    Jack Klein
    Sep 17, 2003
  3. Omid Fatemi

    fcntl and FCNTL

    Omid Fatemi, Oct 30, 2004, in forum: Python
    Replies:
    4
    Views:
    6,847
    Steve Holden
    Nov 1, 2004
  4. Mitko Haralanov

    Invalid argument with fcntl.fcntl

    Mitko Haralanov, Jun 6, 2007, in forum: Python
    Replies:
    0
    Views:
    539
    Mitko Haralanov
    Jun 6, 2007
  5. Greg Martin

    packing and structs

    Greg Martin, Oct 25, 2012, in forum: C Programming
    Replies:
    5
    Views:
    271
    Greg Martin
    Oct 25, 2012
Loading...

Share This Page