~ubuntu-branches/ubuntu/karmic/opensc/karmic-updates

« back to all changes in this revision

Viewing changes to doc/man.out/sc_read_binary.3

  • Committer: Bazaar Package Importer
  • Author(s): Eric Dorland
  • Date: 2009-03-29 03:56:10 UTC
  • mto: (8.2.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: james.westby@ubuntu.com-20090329035610-y7v5a3f0852p4da8
Tags: upstream-0.11.7
ImportĀ upstreamĀ versionĀ 0.11.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.\"     Title: sc_read_binary
 
2
.\"    Author: 
 
3
.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
 
4
.\"      Date: 02/26/2009
 
5
.\"    Manual: OpenSC API reference
 
6
.\"    Source: opensc
 
7
.\"
 
8
.TH "SC_READ_BINARY" "3" "02/26/2009" "opensc" "OpenSC API reference"
 
9
.\" disable hyphenation
 
10
.nh
 
11
.\" disable justification (adjust text to left margin only)
 
12
.ad l
 
13
.SH "NAME"
 
14
sc_read_binary \- Read a file
 
15
.SH "SYNOPSIS"
 
16
.PP
 
17
 
 
18
.sp
 
19
.RS 4
 
20
.nf
 
21
#include <opensc\&.h>
 
22
 
 
23
int sc_read_binary(struct sc_card *card, unsigned int offset,
 
24
                   unsigned char *buf, size_t count,
 
25
                   unsigned long flags);
 
26
                
 
27
.fi
 
28
.RE
 
29
.sp
 
30
.SH "DESCRIPTION"
 
31
.PP
 
32
This function reads from a transparent elementary file (EF) on
 
33
\fIcard\fR\&. It corresponds to the ISO 7816 READ BINARY function\&. Call
 
34
sc_select_file()
 
35
first to select the file to read from\&.
 
36
.PP
 
37
The data read from the file is stored in
 
38
\fIbuf\fR, which is
 
39
\fIcount\fR
 
40
bytes long\&.
 
41
.PP
 
42
The
 
43
\fIoffset\fR
 
44
argument specifies the file offset in bytes\&. The
 
45
\fIflags\fR
 
46
argument is currently not used, and should be set to 0\&.
 
47
.SH "RETURN VALUE"
 
48
.PP
 
49
If successful, the number of bytes read is returned\&. Otherwise, a negative value is returned\&.