ppc_nop.c
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include "klone_conf.h"
00012 #include <string.h>
00013 #include <klone/klog.h>
00014 #include <klone/context.h>
00015 #include <klone/server.h>
00016 #include <klone/ppc.h>
00017 #include <klone/ppc_cmd.h>
00018 #include <klone/server_ppc_cmd.h>
00019 #include "server_s.h"
00020
00021
00022 struct ppc_nop_s
00023 {
00024 int dummy;
00025 };
00026
00027 typedef struct ppc_nop_s ppc_nop_t;
00028
00029
00030 int server_ppc_cmd_nop(server_t *s)
00031 {
00032 ppc_nop_t nop;
00033
00034 nop_err_if(s == NULL);
00035 nop_err_if(s->ppc == NULL);
00036
00037 memset(&nop, 0, sizeof(ppc_nop_t));
00038
00039
00040 nop_err_if(ppc_write(s->ppc, ctx->pipc, PPC_CMD_NOP, (char*)&nop,
00041 sizeof(nop)) < 0);
00042
00043 return 0;
00044 err:
00045 return ~0;
00046 }
00047
00048
00049 int server_ppc_cb_nop(ppc_t *ppc, int fd, unsigned char cmd, char *data,
00050 size_t size, void *vso)
00051 {
00052 u_unused_args(ppc, fd, cmd, data, size, vso);
00053
00054 u_dbg("ppc nop cmd callback");
00055 return 0;
00056 }
00057