Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libplist
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pwn
libplist
Commits
dceb48d2
Commit
dceb48d2
authored
Aug 05, 2008
by
Matt Colyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added beginnings of doxygen documentation to the library.
parent
62bcedce
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1313 additions
and
22 deletions
+1313
-22
doxygen.cfg
doxygen.cfg
+1294
-0
iphone.c
src/iphone.c
+19
-22
No files found.
doxygen.cfg
0 → 100644
View file @
dceb48d2
This diff is collapsed.
Click to expand it.
src/iphone.c
View file @
dceb48d2
...
@@ -26,13 +26,13 @@
...
@@ -26,13 +26,13 @@
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
/* get_iPhone()
*
* Returns a structure with data on the first iPhone it finds.
* (Or NULL, on error)
*/
extern
int
debug
;
extern
int
debug
;
/**
*
* @return A structure with data on the first iPhone it finds. (Or NULL, on
* error)
*/
iPhone
*
get_iPhone
()
{
iPhone
*
get_iPhone
()
{
iPhone
*
phone
=
(
iPhone
*
)
malloc
(
sizeof
(
iPhone
));
iPhone
*
phone
=
(
iPhone
*
)
malloc
(
sizeof
(
iPhone
));
usbmux_version_header
*
version
=
version_header
();
usbmux_version_header
*
version
=
version_header
();
...
@@ -113,14 +113,12 @@ iPhone *get_iPhone() {
...
@@ -113,14 +113,12 @@ iPhone *get_iPhone() {
return
NULL
;
// if it got to this point it's gotta be bad
return
NULL
;
// if it got to this point it's gotta be bad
}
}
/*
free_iPhone(victim)
/*
* Cleans up an iPhone structure, then frees the structure itself.
* This is a library-level function; deals directly with the iPhone to tear
down relations,
* This is a library-level function; deals directly with the iPhone to tear
* but otherwise is mostly internal.
*
down relations,
but otherwise is mostly internal.
*
*
* victim: a pointer to an iPhone structure
* @param victim A pointer to an iPhone structure.
* Cleans up an iPhone structure, then frees the structure itself.
*/
*/
void
free_iPhone
(
iPhone
*
victim
)
{
void
free_iPhone
(
iPhone
*
victim
)
{
if
(
victim
->
buffer
)
free
(
victim
->
buffer
);
if
(
victim
->
buffer
)
free
(
victim
->
buffer
);
if
(
victim
->
device
)
{
if
(
victim
->
device
)
{
...
@@ -131,14 +129,13 @@ void free_iPhone(iPhone *victim) {
...
@@ -131,14 +129,13 @@ void free_iPhone(iPhone *victim) {
free
(
victim
);
free
(
victim
);
}
}
/*
send_to_phone(phone, data, datalen)
/*
* Sends data to the phone
* This is a low-level (i.e. directly to phone) function.
* This is a low-level (i.e. directly to phone) function.
*
*
* phone: the iPhone to send data to
* @param phone The iPhone to send data to
* data: the data to send to the iPhone
* @param data The data to send to the iPhone
* datalen: the length of the data
* @param datalen The length of the data
*
* @return The number of bytes sent, or -1 on error or something.
* Returns the number of bytes sent, or -1 on error or something.
*/
*/
int
send_to_phone
(
iPhone
*
phone
,
char
*
data
,
int
datalen
)
{
int
send_to_phone
(
iPhone
*
phone
,
char
*
data
,
int
datalen
)
{
if
(
!
phone
)
return
-
1
;
if
(
!
phone
)
return
-
1
;
...
@@ -159,14 +156,14 @@ int send_to_phone(iPhone *phone, char *data, int datalen) {
...
@@ -159,14 +156,14 @@ int send_to_phone(iPhone *phone, char *data, int datalen) {
return
-
1
;
return
-
1
;
}
}
/*
recv_from_phone(phone, data, datalen):
/*
*
* This function is a low-level (i.e. direct to iPhone) function.
* This function is a low-level (i.e. direct to iPhone) function.
*
*
*
phone: t
he iPhone to receive data from
*
@param phone T
he iPhone to receive data from
*
data: w
here to put data read
*
@param data W
here to put data read
*
datalen: h
ow much data to read in
*
@param datalen H
ow much data to read in
*
*
*
Returns: h
ow many bytes were read in, or -1 on error.
*
@returns H
ow many bytes were read in, or -1 on error.
*/
*/
int
recv_from_phone
(
iPhone
*
phone
,
char
*
data
,
int
datalen
)
{
int
recv_from_phone
(
iPhone
*
phone
,
char
*
data
,
int
datalen
)
{
if
(
!
phone
)
return
-
1
;
if
(
!
phone
)
return
-
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment