Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
PPSi
Commits
f44fa35b
Commit
f44fa35b
authored
Jan 22, 2012
by
Aurelio Colosimo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
network handling implementation for UDP and skeleton for IEEE 802.3
parent
8d93cedb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
258 additions
and
48 deletions
+258
-48
posix-socket.c
arch-gnu-linux/posix-socket.c
+248
-41
posix-startup.c
arch-gnu-linux/posix-startup.c
+2
-3
posix.h
arch-gnu-linux/posix.h
+3
-1
constants.h
include/pptp/constants.h
+2
-2
pptp.h
include/pptp/pptp.h
+1
-0
state-initializing.c
proto-standard/state-initializing.c
+2
-1
No files found.
arch-gnu-linux/posix-socket.c
View file @
f44fa35b
This diff is collapsed.
Click to expand it.
arch-gnu-linux/posix-startup.c
View file @
f44fa35b
...
...
@@ -53,11 +53,10 @@ int main(int argc, char **argv)
)
exit
(
__LINE__
);
if
(
posix_open_ch
(
ppi
,
ifname
))
pp_diag_fatal
(
ppi
,
"open_ch"
,
strerror
(
errno
));
pp_open_instance
(
ppi
,
NULL
);
OPTS
(
ppi
)
->
iface_name
=
ifname
;
if
(
pp_parse_cmdline
(
ppi
,
argc
,
argv
)
<
0
)
return
-
1
;
...
...
arch-gnu-linux/posix.h
View file @
f44fa35b
...
...
@@ -6,14 +6,16 @@
* These are the functions provided by the various posix files
*/
#define POSIX_ARCH(ppi) ((struct posix_arch_data*)(ppi->arch_data))
struct
posix_arch_data
{
struct
timeval
tv
;
int
rcv_switch
;
/* flag for event / general receive order */
};
extern
int
posix_net_init
(
struct
pp_instance
*
ppi
);
extern
int
posix_net_check_pkt
(
struct
pp_instance
*
ppi
,
int
delay_ms
);
extern
int
posix_open_ch
(
struct
pp_instance
*
ppi
,
char
*
name
);
extern
int
posix_open_ch
(
struct
pp_instance
*
ppi
,
char
*
name
,
int
chtype
);
extern
int
posix_recv_packet
(
struct
pp_instance
*
ppi
,
void
*
pkt
,
int
len
,
TimeInternal
*
t
);
...
...
include/pptp/constants.h
View file @
f44fa35b
...
...
@@ -71,8 +71,8 @@
#define PP_CLOCK_IDENTITY_LENGTH 8
#define PP_FLAG_FIELD_LENGTH 2
#define PP_PACKET_SIZE 300
#define PP_EV
EN
T_PORT 319
#define PP_GEN
ERAL
_PORT 320
#define PP_EVT_PORT 319
#define PP_GEN_PORT 320
#define PP_DEFAULT_DOMAIN_ADDRESS "224.0.1.129"
#define PP_PEER_DOMAIN_ADDRESS "224.0.0.107"
#define PP_MM_STARTING_BOUNDARY_HOPS 0x7fff
...
...
include/pptp/pptp.h
View file @
f44fa35b
...
...
@@ -143,6 +143,7 @@ struct pp_servo {
#define PP_NP_GEN 0
#define PP_NP_EVT 1
#define PP_NP_LAST 1
struct
pp_net_path
{
struct
pp_channel
ch
[
2
];
/* event and general channel (see above
* #define's */
...
...
proto-standard/state-initializing.c
View file @
f44fa35b
...
...
@@ -21,7 +21,8 @@ int pp_initializing(struct pp_instance *ppi, unsigned char *pkt, int plen)
/* Initialize default data set */
DSDEF
(
ppi
)
->
twoStepFlag
=
PP_TWO_STEP_FLAG
;
/* TODO initialize clockIdentity with MAC address */
pp_memcpy
(
DSDEF
(
ppi
)
->
clockIdentity
,
NP
(
ppi
)
->
ch
[
PP_NP_GEN
].
addr
,
PP_CLOCK_IDENTITY_LENGTH
);
DSDEF
(
ppi
)
->
clockIdentity
[
3
]
=
0xff
;
DSDEF
(
ppi
)
->
clockIdentity
[
4
]
=
0xfe
;
DSDEF
(
ppi
)
->
numberPorts
=
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