aboutsummaryrefslogblamecommitdiffstatshomepage
path: root/src/msg.h
blob: f6b85e6f86eac4bc95673db33e05a3520a65c623 (plain) (tree)
1
2
3
4
5
6
7
8
9
10







                    

                              



                                       
                                         

                                  
                                             
 
                                   
                                         
 
                                                                        
 
                                  
 
      
#ifndef __MSG_H__
#define __MSG_H__

struct msg {
	int argc;
	char **argv;
};

int msg_success(struct msg *);
int msg_error(struct msg *);

int msg_is_success(const struct msg *);
int msg_is_error(const struct msg *);

struct msg *msg_copy(const struct msg *);
void msg_free(const struct msg *);

int msg_from_argv(struct msg *, char **argv);

int msg_recv(int fd, struct msg *);
int msg_send(int fd, const struct msg *);

int msg_send_and_wait(int fd, const struct msg *, struct msg *response);

void msg_dump(const struct msg *);

#endif