• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/netatalk-2.2.5/libatalk/util/

Lines Matching refs:ipc

53 static int ipc_kill_token(struct ipc_header *ipc, server_child *children)
57 if (ipc->len != sizeof(pid_t)) {
61 memcpy (&pid, ipc->msg, sizeof(pid_t));
66 ipc->uid,
67 ipc->afp_socket,
68 ipc->DSI_requestID);
72 static int ipc_get_session(struct ipc_header *ipc, server_child *children)
79 if (ipc->len < (sizeof(idlen) + sizeof(boottime)) )
82 p = ipc->msg;
90 if (ipc->len < idlen + sizeof(idlen) + sizeof(boottime))
98 ipc->child_pid, ipc->uid, boottime);
102 ipc->child_pid,
103 ipc->uid,
227 struct ipc_header ipc;
242 memcpy(&ipc.command, p, sizeof(ipc.command));
243 p += sizeof(ipc.command);
245 memcpy(&ipc.child_pid, p, sizeof(ipc.child_pid));
246 p += sizeof(ipc.child_pid);
248 memcpy(&ipc.uid, p, sizeof(ipc.uid));
249 p += sizeof(ipc.uid);
251 memcpy(&ipc.len, p, sizeof(ipc.len));
254 if (ipc.len > (IPC_MAXMSGSIZE - IPC_HEADERLEN)) {
255 LOG (log_info, logtype_afpd, "IPC message exceeds allowed size (%u)", ipc.len);
260 if ( ipc.len != 0) {
261 if ((ret = read(fd, buf, ipc.len)) != (int) ipc.len) {
263 ret, ipc.len, strerror(errno));
267 ipc.msg = buf;
270 ipc_cmd_str[ipc.command], ipc.child_pid);
274 switch (ipc.command) {
277 if (readt(fd, &ipc.DSI_requestID, 2, 0, 2) != 2) {
279 ipc_cmd_str[ipc.command], ipc.child_pid, strerror(errno));
282 if ((ipc.afp_socket = recv_fd(fd, 1)) == -1) {
284 ipc_cmd_str[ipc.command], ipc.child_pid, strerror(errno));
287 if (ipc_kill_token(&ipc, children) == 1) {
290 ipc.child_pid);
291 kill(ipc.child_pid, SIGTERM);
293 close(ipc.afp_socket);
297 if (ipc_get_session(&ipc, children) != 0)
302 LOG (log_info, logtype_afpd, "ipc_read: unknown command: %d", ipc.command);