File: dsi_getstat.c

package info (click to toggle)
netatalk 3.1.12~ds-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 14,756 kB
  • sloc: ansic: 104,976; sh: 8,247; xml: 7,394; perl: 1,936; makefile: 1,430; python: 1,342; yacc: 309; lex: 49
file content (28 lines) | stat: -rw-r--r-- 653 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
 *
 * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
 * All rights reserved. See COPYRIGHT.
 */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */

#include <stdio.h>
#include <string.h>
#include <arpa/inet.h>

#include <atalk/dsi.h>

/* return the status and then delete the connection. most of the
 * fields are already set. */
void dsi_getstatus(DSI *dsi)
{
  dsi->header.dsi_flags = DSIFL_REPLY;
  /*dsi->header.dsi_command = DSIFUNC_STAT;*/
  dsi->header.dsi_data.dsi_code = dsi->header.dsi_reserved = 0;
  
  memcpy(dsi->commands, dsi->status, dsi->statuslen);
  dsi->cmdlen = dsi->statuslen; 
  dsi_send(dsi);
}