Thread: C unix program to call remote procedures with FIFO?

  1. #1
    Registered User
    Join Date
    Sep 2014
    Posts
    121

    C unix program to call remote procedures with FIFO?

    Hello, first I want to ask if it`s possible to call a remote procedure via FIFO pipe from unix with standart FIFO producer/consumer algorithm?
    Here is my daemon implementation:
    https://github.com/heatblazer/linux-...-interface.cpp

    The fiforeader funciton does the reading and the test writing to a test file.

    And the commander which writes to the fifo pipe:
    https://github.com/heatblazer/linux-...al/commander.c

    So can I produca e function call, let`s say that I have a struct
    Code:
    struct {
       long myid;
       struct {
          int (*_0)(void);
          int (*_1)(void);
          int (*_2)(void);
       } procedures; 
    };
    I want to call these functions form the commander interface. Any info would be great.

  2. #2
    Registered User
    Join Date
    Sep 2014
    Posts
    121
    I`ve heard also about offsetof macro which can be used to acces N-th member of the struct but how can I achieve this via a raw buffer, that comes from the pipe?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 6
    Last Post: 12-12-2013, 03:44 AM
  2. select system call with FIFO fd.
    By vlrk in forum Linux Programming
    Replies: 0
    Last Post: 05-11-2009, 04:27 AM
  3. Call a remote C# program from a C program on unix
    By goup in forum C Programming
    Replies: 4
    Last Post: 11-09-2006, 07:46 PM
  4. Classes and static call back procedures
    By bennyandthejets in forum Windows Programming
    Replies: 9
    Last Post: 08-28-2003, 07:31 AM
  5. Need help with FIFO's in Unix programming
    By Brackus in forum Linux Programming
    Replies: 1
    Last Post: 02-01-2003, 03:53 AM

Tags for this Thread