Commit 600a052f authored by Alessandro Rubini's avatar Alessandro Rubini

Rename PPTP to PPSi

This is a major patch, because header files are renamed, and
the header directory with them. Still, no functional change is there.
parent 0edaa7f3
*.map* *.map*
*.o *.o
*.a *.a
pptp.bin ppsi.bin
*.patch *.patch
*~ *~
/pptp /ppsi
The authors (or people who mostly developed the code) are specified inside each The authors (or people who mostly developed the code) are specified inside each
file which compose the PPTP source. file which compose the PPSi source.
Where no otherways specified, the authors are: Where no otherways specified, the authors are:
......
...@@ -7,8 +7,8 @@ build_one () { ...@@ -7,8 +7,8 @@ build_one () {
echo "####################" echo "####################"
echo "Build for " "$1" echo "Build for " "$1"
make -s -k $2 make -s -k $2
test -f pptp.o && size pptp.o test -f ppsi.o && size ppsi.o
test -f pptp && size pptp test -f ppsi && size ppsi
} }
build_diags () { build_diags () {
......
...@@ -14,7 +14,7 @@ OBJCOPY = $(CROSS_COMPILE)objcopy ...@@ -14,7 +14,7 @@ OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump OBJDUMP = $(CROSS_COMPILE)objdump
# Instead of repeating "proto-daemon" over and over, bless it TARGET # Instead of repeating "proto-daemon" over and over, bless it TARGET
TARGET = pptp TARGET = ppsi
# The main target is the big object file. # The main target is the big object file.
all: $(TARGET).o all: $(TARGET).o
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
About This Project About This Project
================== ==================
pptp (Portable Precision Time Protocol) is an application which, in PPSi (PTP Ported to Silicon) is an application which, in
its basic operation, implements IEEE 1588 specification in a way its basic operation, implements IEEE 1588 specification in a way
that is portable to several architectures, including OS-less ones. that is portable to several architectures, including OS-less ones.
Configuration is performed using environment variables, as explained later. Configuration is performed using environment variables, as explained later.
...@@ -79,7 +79,7 @@ should be edited before building and the pristine package can be used). ...@@ -79,7 +79,7 @@ should be edited before building and the pristine package can be used).
The basic state machine is in ./fsm.c . It's a simple file released in The basic state machine is in ./fsm.c . It's a simple file released in
the public domain as we'd like the idea to be reused and the code the public domain as we'd like the idea to be reused and the code
itself is not worth copylefting. Please note that the pptp as a whole itself is not worth copylefting. Please note that the ppsi as a whole
is LGPL-2.1 or later. is LGPL-2.1 or later.
All the rest of the package is built as libraries. The link order All the rest of the package is built as libraries. The link order
...@@ -166,14 +166,14 @@ With no diagnostics, the printf does nothing and only puts() is available. ...@@ -166,14 +166,14 @@ With no diagnostics, the printf does nothing and only puts() is available.
The hosted architecture includes command line support: The hosted architecture includes command line support:
./pptp --help ./ppsi --help
will print help about command line options (we also support the will print help about command line options (we also support the
question-mark like the original ptp, but it's a bad choice because question-mark like the original ptp, but it's a bad choice because
it's a shell wildcard). Actually, all multi-char options will it's a shell wildcard). Actually, all multi-char options will
print the help at this point in time, but this will be fixed. print the help at this point in time, but this will be fixed.
For standard operation, simply run ./pptp with no options. It will For standard operation, simply run ./ppsi with no options. It will
work like the ptpd executable, with the automatic choice of work like the ptpd executable, with the automatic choice of
master/slave defined in IEEE spec (announce/timeout mechanism). master/slave defined in IEEE spec (announce/timeout mechanism).
...@@ -188,7 +188,7 @@ Documentation/CodingStyle in the kernel sources). However, ...@@ -188,7 +188,7 @@ Documentation/CodingStyle in the kernel sources). However,
structures, constants and field names defined by IEEE 1588 are kept in structures, constants and field names defined by IEEE 1588 are kept in
the suggested "CamelCase" form. Similarly, the typedefs are left, even the suggested "CamelCase" form. Similarly, the typedefs are left, even
if they are really a pain to deal with. Most of this stuff is in if they are really a pain to deal with. Most of this stuff is in
include/pptp/ieee1588_types.h file. include/ppsi/ieee1588_types.h file.
The mostly used prefix is (pp_), the short prefix for 'Portable PTP', The mostly used prefix is (pp_), the short prefix for 'Portable PTP',
which is used for every function related to the algorithm itself (but which is used for every function related to the algorithm itself (but
......
/* /*
* Alessandro Rubini for CERN, 2011 -- GPL 2 or later (it includes u-boot code) * Alessandro Rubini for CERN, 2011 -- GPL 2 or later (it includes u-boot code)
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include "bare-linux.h" #include "bare-linux.h"
void pp_puts(const char *s) void pp_puts(const char *s)
......
OUTPUT_FORMAT("elf32-i386") OUTPUT_FORMAT("elf32-i386")
OUTPUT_ARCH(i386) OUTPUT_ARCH(i386)
ENTRY(_pptp_start) ENTRY(_ppsi_start)
SECTIONS SECTIONS
{ {
. = 0x10000000; /* A random address, non-standard by choice*/ . = 0x10000000; /* A random address, non-standard by choice*/
.text : { .text : {
_pptp_start = .; _ppsi_start = .;
*(.boot) *(.boot)
*(.text) *(.text)
} }
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
*/ */
/* Socket interface for bare Linux */ /* Socket interface for bare Linux */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include <pptp/diag.h> #include <ppsi/diag.h>
#include "bare-linux.h" #include "bare-linux.h"
/* FIXME: which socket we receive and send with? */ /* FIXME: which socket we receive and send with? */
......
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
* This is the startup thing for "freestanding" stuff under Linux. * This is the startup thing for "freestanding" stuff under Linux.
* It must also clear the BSS as I'm too lazy to do that in asm * It must also clear the BSS as I'm too lazy to do that in asm
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include <pptp/diag.h> #include <ppsi/diag.h>
#include "bare-linux.h" #include "bare-linux.h"
void pptp_clear_bss(void) void ppsi_clear_bss(void)
{ {
int *ptr; int *ptr;
extern int __bss_start, __bss_end; extern int __bss_start, __bss_end;
...@@ -23,7 +23,7 @@ void pptp_clear_bss(void) ...@@ -23,7 +23,7 @@ void pptp_clear_bss(void)
static struct pp_instance ppi_static; static struct pp_instance ppi_static;
static struct pp_net_path net_path_static; static struct pp_net_path net_path_static;
void pptp_main(void) void ppsi_main(void)
{ {
struct pp_instance *ppi = &ppi_static; /* no malloc, one instance */ struct pp_instance *ppi = &ppi_static; /* no malloc, one instance */
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* Alessandro Rubini for CERN, 2011 -- GNU GPL v2 or later * Alessandro Rubini for CERN, 2011 -- GNU GPL v2 or later
*/ */
.section .boot, "ax" .section .boot, "ax"
.extern pptp_main .extern ppsi_main
call pptp_clear_bss /* In C, lazy me */ call ppsi_clear_bss /* In C, lazy me */
call pptp_main call ppsi_main
.end .end
\ No newline at end of file
#ifndef __PPTP_ARCH_CONSTANTS_H__ #ifndef __PPSI_ARCH_CONSTANTS_H__
#define __PPTP_ARCH_CONSTANTS_H__ #define __PPSI_ARCH_CONSTANTS_H__
#ifndef __PPTP_CONSTANTS_H__ #ifndef __PPSI_CONSTANTS_H__
#Warning "Please include <pptp/constants.h> before <arch/constants.h>" #Warning "Please include <ppsi/constants.h> before <arch/constants.h>"
#endif #endif
#undef PP_DEFAULT_ETHERNET_MODE #undef PP_DEFAULT_ETHERNET_MODE
#define PP_DEFAULT_ETHERNET_MODE 1 /* We only use raw ethernet */ #define PP_DEFAULT_ETHERNET_MODE 1 /* We only use raw ethernet */
#endif /* __PPTP_ARCH_CONSTANTS_H__ */ #endif /* __PPSI_ARCH_CONSTANTS_H__ */
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/* /*
* This is the main loop for "freestanding" stuff under Linux. * This is the main loop for "freestanding" stuff under Linux.
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include "bare-linux.h" #include "bare-linux.h"
/* Define other hackish stuff */ /* Define other hackish stuff */
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
*/ */
#include <linux/unistd.h> #include <linux/unistd.h>
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include "bare-linux.h" #include "bare-linux.h"
#include "syscalls.h" #include "syscalls.h"
......
#ifndef __PPTP_ARCH_CONSTANTS_H__ #ifndef __PPSI_ARCH_CONSTANTS_H__
#define __PPTP_ARCH_CONSTANTS_H__ #define __PPSI_ARCH_CONSTANTS_H__
#ifndef __PPTP_CONSTANTS_H__ #ifndef __PPSI_CONSTANTS_H__
#Warning "Please include <pptp/constants.h> before <arch/constants.h>" #Warning "Please include <ppsi/constants.h> before <arch/constants.h>"
#endif #endif
/* nothing to do here, we keep project-wide defaults */ /* nothing to do here, we keep project-wide defaults */
#endif /* __PPTP_ARCH_CONSTANTS_H__ */ #endif /* __PPSI_ARCH_CONSTANTS_H__ */
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
#include <sys/select.h> #include <sys/select.h>
#include <linux/if_ether.h> #include <linux/if_ether.h>
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include <pptp/diag.h> #include <ppsi/diag.h>
#include "posix.h" #include "posix.h"
void posix_main_loop(struct pp_instance *ppi) void posix_main_loop(struct pp_instance *ppi)
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#include <sys/timex.h> #include <sys/timex.h>
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include <pptp/diag.h> #include <ppsi/diag.h>
const Integer32 PP_ADJ_FREQ_MAX = 512000; const Integer32 PP_ADJ_FREQ_MAX = 512000;
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
#include <net/ethernet.h> #include <net/ethernet.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include <pptp/diag.h> #include <ppsi/diag.h>
#include "posix.h" #include "posix.h"
/* posix_recv_msg uses recvmsg for timestamp query */ /* posix_recv_msg uses recvmsg for timestamp query */
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include <pptp/diag.h> #include <ppsi/diag.h>
#include "posix.h" #include "posix.h"
int pp_diag_verbosity = 0; int pp_diag_verbosity = 0;
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
#include <errno.h> #include <errno.h>
#include <stdlib.h> #include <stdlib.h>
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include <pptp/diag.h> #include <ppsi/diag.h>
#include "posix.h" #include "posix.h"
/* In ptpd-2.1.0/src/dep/timer.c the mechanism was different. /* In ptpd-2.1.0/src/dep/timer.c the mechanism was different.
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* GNU LGPL 2.1 or later versions * GNU LGPL 2.1 or later versions
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include "../spec.h" #include "../spec.h"
#include "syscon.h" #include "syscon.h"
#include <endpoint.h> #include <endpoint.h>
......
#ifndef __PPTP_ARCH_CONSTANTS_H__ #ifndef __PPSI_ARCH_CONSTANTS_H__
#define __PPTP_ARCH_CONSTANTS_H__ #define __PPSI_ARCH_CONSTANTS_H__
#ifndef __PPTP_CONSTANTS_H__ #ifndef __PPSI_CONSTANTS_H__
#Warning "Please include <pptp/constants.h> before <arch/constants.h>" #Warning "Please include <ppsi/constants.h> before <arch/constants.h>"
#endif #endif
#undef PP_DEFAULT_ETHERNET_MODE #undef PP_DEFAULT_ETHERNET_MODE
#define PP_DEFAULT_ETHERNET_MODE 1 /* We only use raw ethernet */ #define PP_DEFAULT_ETHERNET_MODE 1 /* We only use raw ethernet */
#endif /* __PPTP_ARCH_CONSTANTS_H__ */ #endif /* __PPSI_ARCH_CONSTANTS_H__ */
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
/* /*
* This is the main loop for the Spec board * This is the main loop for the Spec board
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include <pptp/diag.h> #include <ppsi/diag.h>
#include "spec.h" #include "spec.h"
void spec_main_loop(struct pp_instance *ppi) void spec_main_loop(struct pp_instance *ppi)
......
/* /*
* Alessandro Rubini for CERN, 2011 -- public domain * Alessandro Rubini for CERN, 2011 -- public domain
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include <hw/wb_uart.h> #include <hw/wb_uart.h>
#include "spec.h" #include "spec.h"
......
/* /*
* Alessandro Rubini for CERN, 2011 -- GNU LGPL v2.1 or later * Alessandro Rubini for CERN, 2011 -- GNU LGPL v2.1 or later
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include "spec.h" #include "spec.h"
#include "include/syscon.h" #include "include/syscon.h"
#include "include/minic.h" #include "include/minic.h"
#include<pptp/diag.h> #include<ppsi/diag.h>
int spec_errno; int spec_errno;
Octet buffer_out[PP_PACKET_SIZE + 14]; // 14 is ppi->proto_ofst for ethernet mode Octet buffer_out[PP_PACKET_SIZE + 14]; // 14 is ppi->proto_ofst for ethernet mode
......
/* /*
* Alessandro Rubini for CERN, 2011 -- GNU LGPL v2.1 or later * Alessandro Rubini for CERN, 2011 -- GNU LGPL v2.1 or later
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include <pptp/diag.h> #include <ppsi/diag.h>
#include "spec.h" #include "spec.h"
#include "include/syscon.h" #include "include/syscon.h"
...@@ -20,7 +20,7 @@ static struct pp_net_path net_path; ...@@ -20,7 +20,7 @@ static struct pp_net_path net_path;
static struct pp_servo servo; static struct pp_servo servo;
static struct pp_frgn_master frgn_master; static struct pp_frgn_master frgn_master;
void pptp_main(void) void ppsi_main(void)
{ {
struct pp_instance *ppi = &ppi_static; /* no malloc, one instance */ struct pp_instance *ppi = &ppi_static; /* no malloc, one instance */
...@@ -59,7 +59,7 @@ void pptp_main(void) ...@@ -59,7 +59,7 @@ void pptp_main(void)
/* Our crt0.S is unchanged: it wants a "main" function, and "_irq_entry" too" */ /* Our crt0.S is unchanged: it wants a "main" function, and "_irq_entry" too" */
int main(void) __attribute__((alias("pptp_main"))); int main(void) __attribute__((alias("ppsi_main")));
void _irq_entry(void) void _irq_entry(void)
{ {
......
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include <pps_gen.h> #include <pps_gen.h>
static struct pp_timer spec_timers[PP_TIMER_ARRAY_SIZE]; static struct pp_timer spec_timers[PP_TIMER_ARRAY_SIZE];
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#ifndef __SPEC_H #ifndef __SPEC_H
#define __SPEC_H #define __SPEC_H
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
/* /*
* These are the functions provided by the various bare files * These are the functions provided by the various bare files
*/ */
...@@ -17,7 +17,7 @@ extern int spec_send_packet(struct pp_instance *ppi, void *pkt, int len, ...@@ -17,7 +17,7 @@ extern int spec_send_packet(struct pp_instance *ppi, void *pkt, int len,
extern void spec_main_loop(struct pp_instance *ppi); extern void spec_main_loop(struct pp_instance *ppi);
extern void _irq_entry(void); /* unused, to make crt0.S happy */ extern void _irq_entry(void); /* unused, to make crt0.S happy */
extern int main(void); /* alias to pptp_main, so crt0.S is happy */ extern int main(void); /* alias to ppsi_main, so crt0.S is happy */
/* basics */ /* basics */
extern void *memset(void *s, int c, int count); extern void *memset(void *s, int c, int count);
......
/* /*
* Alessandro Rubini for CERN, 2011 -- public domain * Alessandro Rubini for CERN, 2011 -- public domain
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
/* /*
* Having no diagnostics, just make one function that returns 0 and alias * Having no diagnostics, just make one function that returns 0 and alias
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
* (please note that the vsprintf is not public domain but GPL) * (please note that the vsprintf is not public domain but GPL)
*/ */
#include <stdarg.h> #include <stdarg.h>
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include <pptp/diag.h> #include <ppsi/diag.h>
#define PP_BUF 128 /* We prefer small targets */ #define PP_BUF 128 /* We prefer small targets */
......
/* /*
* Alessandro Rubini for CERN, 2011 -- public domain * Alessandro Rubini for CERN, 2011 -- public domain
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include <pptp/diag.h> #include <ppsi/diag.h>
/* /*
* This has diagnostics. It calls pp_printf (which one, we don't know) * This has diagnostics. It calls pp_printf (which one, we don't know)
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <stdarg.h> #include <stdarg.h>
/* BEGIN OF HACKS */ /* BEGIN OF HACKS */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
/* <ctype.h> */ /* <ctype.h> */
static inline int isdigit(int c) static inline int isdigit(int c)
......
/* /*
* Alessandro Rubini for CERN, 2011 -- public domain * Alessandro Rubini for CERN, 2011 -- public domain
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include <pptp/diag.h> #include <ppsi/diag.h>
/* /*
* This is the state machine code. i.e. the extension-independent * This is the state machine code. i.e. the extension-independent
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* Based on PTPd project v. 2.1.0 (see AUTHORS for details) * Based on PTPd project v. 2.1.0 (see AUTHORS for details)
*/ */
#ifndef __PPTP_CONSTANTS_H__ #ifndef __PPSI_CONSTANTS_H__
#define __PPTP_CONSTANTS_H__ #define __PPSI_CONSTANTS_H__
/* general purpose constants */ /* general purpose constants */
#define PP_NSEC_PER_SEC (1000*1000*1000) #define PP_NSEC_PER_SEC (1000*1000*1000)
...@@ -96,4 +96,4 @@ ...@@ -96,4 +96,4 @@
#include <arch/constants.h> /* architectures may override the defaults */ #include <arch/constants.h> /* architectures may override the defaults */
#endif /* __PPTP_CONSTANTS_H__ */ #endif /* __PPSI_CONSTANTS_H__ */
/* /*
* Alessandro Rubini for CERN, 2011 -- public domain * Alessandro Rubini for CERN, 2011 -- public domain
*/ */
#ifndef __PPTP_DIAG_H__ #ifndef __PPSI_DIAG_H__
#define __PPTP_DIAG_H__ #define __PPSI_DIAG_H__
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
/* /*
* The diagnostic functions (diag-yes.c and diag-no.c). * The diagnostic functions (diag-yes.c and diag-no.c).
* *
...@@ -34,4 +34,4 @@ extern int pp_vprintf(const char *fmt, va_list args) ...@@ -34,4 +34,4 @@ extern int pp_vprintf(const char *fmt, va_list args)
extern int pp_vsprintf(char *buf, const char *, va_list) extern int pp_vsprintf(char *buf, const char *, va_list)
__attribute__ ((format (printf, 2, 0))); __attribute__ ((format (printf, 2, 0)));
#endif /* __PPTP_DIAG_H__ */ #endif /* __PPSI_DIAG_H__ */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
/* Structs defined in IEEE Std 1588-2008 */ /* Structs defined in IEEE Std 1588-2008 */
#ifndef __PPTP_IEEE_1588_TYPES_H__ #ifndef __PPSI_IEEE_1588_TYPES_H__
#define __PPTP_IEEE_1588_TYPES_H__ #define __PPSI_IEEE_1588_TYPES_H__
#include <stdint.h> #include <stdint.h>
...@@ -309,4 +309,4 @@ enum ENDelayMechanism { ...@@ -309,4 +309,4 @@ enum ENDelayMechanism {
DELAY_DISABLED = 0xFE DELAY_DISABLED = 0xFE
}; };
#endif /* __PPTP_IEEE_1588_TYPES_H__ */ #endif /* __PPSI_IEEE_1588_TYPES_H__ */
/* /*
* Alessandro Rubini and Aurelio Colosimo for CERN, 2011 -- public domain * Alessandro Rubini and Aurelio Colosimo for CERN, 2011 -- public domain
*/ */
#ifndef __PPTP_LIB_H__ #ifndef __PPSI_LIB_H__
#define __PPTP_LIB_H__ #define __PPSI_LIB_H__
#include <stdint.h> #include <stdint.h>
/* We base on puts and a few more functions: each arch must have it */ /* We base on puts and a few more functions: each arch must have it */
...@@ -14,4 +14,4 @@ extern void *pp_memset(void *s, int c, int count); ...@@ -14,4 +14,4 @@ extern void *pp_memset(void *s, int c, int count);
extern uint32_t __div64_32(uint64_t *n, uint32_t base); extern uint32_t __div64_32(uint64_t *n, uint32_t base);
#endif /* __PPTP_LIB_H__ */ #endif /* __PPSI_LIB_H__ */
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
* Aurelio Colosimo for CERN, 2011 -- GNU LGPL v2.1 or later * Aurelio Colosimo for CERN, 2011 -- GNU LGPL v2.1 or later
*/ */
#ifndef __PPTP_PPTP_H__ #ifndef __PPSI_PPSI_H__
#define __PPTP_PPTP_H__ #define __PPSI_PPSI_H__
#include <stdint.h> #include <stdint.h>
#include <stdarg.h> #include <stdarg.h>
#include <arch/arch.h> /* ntohs and so on */ #include <arch/arch.h> /* ntohs and so on */
#include <pptp/lib.h> #include <ppsi/lib.h>
#include <pptp/ieee1588_types.h> #include <ppsi/ieee1588_types.h>
#include <pptp/constants.h> #include <ppsi/constants.h>
#define __weak __attribute__((weak)) #define __weak __attribute__((weak))
...@@ -370,4 +370,4 @@ extern pp_action pp_initializing, pp_faulty, pp_disabled, pp_listening, ...@@ -370,4 +370,4 @@ extern pp_action pp_initializing, pp_faulty, pp_disabled, pp_listening,
/* The engine */ /* The engine */
extern int pp_state_machine(struct pp_instance *ppi, uint8_t *packet, int plen); extern int pp_state_machine(struct pp_instance *ppi, uint8_t *packet, int plen);
#endif /* __PPTP_PPTP_H__ */ #endif /* __PPSI_PPSI_H__ */
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* Aurelio Colosimo for CERN, 2011 -- GNU LGPL v2.1 or later * Aurelio Colosimo for CERN, 2011 -- GNU LGPL v2.1 or later
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include <pptp/diag.h> #include <ppsi/diag.h>
#define CMD_LINE_SEPARATOR {"", ""} #define CMD_LINE_SEPARATOR {"", ""}
...@@ -57,7 +57,7 @@ static struct cmd_line_opt cmd_line_list[] = { ...@@ -57,7 +57,7 @@ static struct cmd_line_opt cmd_line_list[] = {
static void cmd_line_print_help(void) static void cmd_line_print_help(void)
{ {
int i = 0; int i = 0;
pp_printf("\nUsage: pptp [OPTION]\n\n"); pp_printf("\nUsage: ppsi [OPTION]\n\n");
while (1) { while (1) {
struct cmd_line_opt *o = &cmd_line_list[i]; struct cmd_line_opt *o = &cmd_line_list[i];
......
/* This file in pptp is a subset of lib/div64.c in Linux source code */ /* This file in ppsi is a subset of lib/div64.c in Linux source code */
/* /*
* Copyright (C) 2003 Bernardo Innocenti <bernie@develer.com> * Copyright (C) 2003 Bernardo Innocenti <bernie@develer.com>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* for some CPUs. __div64_32() can be overridden by linking arch-specific * for some CPUs. __div64_32() can be overridden by linking arch-specific
* assembly versions such as arch/ppc/lib/div64.S and arch/sh/lib/div64.S. * assembly versions such as arch/ppc/lib/div64.S and arch/sh/lib/div64.S.
*/ */
#include <pptp/lib.h> #include <ppsi/lib.h>
uint32_t __div64_32(uint64_t *n, uint32_t base) uint32_t __div64_32(uint64_t *n, uint32_t base)
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Aurelio Colosimo for CERN, 2011 -- GNU LGPL v2.1 or later * Aurelio Colosimo for CERN, 2011 -- GNU LGPL v2.1 or later
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
/* This is a placeholder for white rabbit extension. */ /* This is a placeholder for white rabbit extension. */
/* TODO extension white rabbit*/ /* TODO extension white rabbit*/
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
*/ */
#include <limits.h> #include <limits.h>
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include <pptp/diag.h> #include <ppsi/diag.h>
void int64_to_TimeInternal(Integer64 bigint, TimeInternal *internal) void int64_to_TimeInternal(Integer64 bigint, TimeInternal *internal)
{ {
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* Based on PTPd project v. 2.1.0 (see AUTHORS for details) * Based on PTPd project v. 2.1.0 (see AUTHORS for details)
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include <pptp/diag.h> #include <ppsi/diag.h>
/* Flag Field bits symbolic names (table 57, pag. 151) */ /* Flag Field bits symbolic names (table 57, pag. 151) */
#define FFB_LI61 0x01 #define FFB_LI61 0x01
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* Based on PTPd project v. 2.1.0 (see AUTHORS for details) * Based on PTPd project v. 2.1.0 (see AUTHORS for details)
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include <pptp/diag.h> #include <ppsi/diag.h>
#include "common-fun.h" #include "common-fun.h"
int st_com_execute_slave(struct pp_instance *ppi, int check_delayreq) int st_com_execute_slave(struct pp_instance *ppi, int check_delayreq)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Based on PTPd project v. 2.1.0 (see AUTHORS for details) * Based on PTPd project v. 2.1.0 (see AUTHORS for details)
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
/* Contains all functions common to more than one state */ /* Contains all functions common to more than one state */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Aurelio Colosimo for CERN, 2011 -- GNU LGPL v2.1 or later * Aurelio Colosimo for CERN, 2011 -- GNU LGPL v2.1 or later
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
/* /*
* This is the default state machine table. It is weak so an extension * This is the default state machine table. It is weak so an extension
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* Based on PTPd project v. 2.1.0 (see AUTHORS for details) * Based on PTPd project v. 2.1.0 (see AUTHORS for details)
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include <pptp/diag.h> #include <ppsi/diag.h>
static inline void Integer64_display(const char *label, Integer64 *bigint) static inline void Integer64_display(const char *label, Integer64 *bigint)
{ {
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* Aurelio Colosimo for CERN, 2011 -- GNU LGPL v2.1 or later * Aurelio Colosimo for CERN, 2011 -- GNU LGPL v2.1 or later
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include <pptp/diag.h> #include <ppsi/diag.h>
/* /*
* This file deals with opening and closing an instance. The channel * This file deals with opening and closing an instance. The channel
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* Based on PTPd project v. 2.1.0 (see AUTHORS for details) * Based on PTPd project v. 2.1.0 (see AUTHORS for details)
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include <pptp/diag.h> #include <ppsi/diag.h>
void pp_init_clock(struct pp_instance *ppi) void pp_init_clock(struct pp_instance *ppi)
{ {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Based on PTPd project v. 2.1.0 (see AUTHORS for details) * Based on PTPd project v. 2.1.0 (see AUTHORS for details)
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
int pp_disabled(struct pp_instance *ppi, unsigned char *pkt, int plen) int pp_disabled(struct pp_instance *ppi, unsigned char *pkt, int plen)
{ {
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* Based on PTPd project v. 2.1.0 (see AUTHORS for details) * Based on PTPd project v. 2.1.0 (see AUTHORS for details)
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include <pptp/diag.h> #include <ppsi/diag.h>
/* /*
* Fault troubleshooting. Now only prints an error messages and comes back to * Fault troubleshooting. Now only prints an error messages and comes back to
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* Based on PTPd project v. 2.1.0 (see AUTHORS for details) * Based on PTPd project v. 2.1.0 (see AUTHORS for details)
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include <pptp/diag.h> #include <ppsi/diag.h>
/* /*
* Initializes network and other stuff * Initializes network and other stuff
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* Based on PTPd project v. 2.1.0 (see AUTHORS for details) * Based on PTPd project v. 2.1.0 (see AUTHORS for details)
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include <pptp/diag.h> #include <ppsi/diag.h>
#include "common-fun.h" #include "common-fun.h"
int pp_listening(struct pp_instance *ppi, unsigned char *pkt, int plen) int pp_listening(struct pp_instance *ppi, unsigned char *pkt, int plen)
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* Based on PTPd project v. 2.1.0 (see AUTHORS for details) * Based on PTPd project v. 2.1.0 (see AUTHORS for details)
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include <pptp/diag.h> #include <ppsi/diag.h>
#include "common-fun.h" #include "common-fun.h"
int pp_master(struct pp_instance *ppi, unsigned char *pkt, int plen) int pp_master(struct pp_instance *ppi, unsigned char *pkt, int plen)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Based on PTPd project v. 2.1.0 (see AUTHORS for details) * Based on PTPd project v. 2.1.0 (see AUTHORS for details)
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include "common-fun.h" #include "common-fun.h"
int pp_passive(struct pp_instance *ppi, unsigned char *pkt, int plen) int pp_passive(struct pp_instance *ppi, unsigned char *pkt, int plen)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Based on PTPd project v. 2.1.0 (see AUTHORS for details) * Based on PTPd project v. 2.1.0 (see AUTHORS for details)
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
int pp_pre_master(struct pp_instance *ppi, unsigned char *pkt, int plen) int pp_pre_master(struct pp_instance *ppi, unsigned char *pkt, int plen)
{ {
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* Based on PTPd project v. 2.1.0 (see AUTHORS for details) * Based on PTPd project v. 2.1.0 (see AUTHORS for details)
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include <pptp/diag.h> #include <ppsi/diag.h>
#include "common-fun.h" #include "common-fun.h"
int pp_slave(struct pp_instance *ppi, unsigned char *pkt, int plen) int pp_slave(struct pp_instance *ppi, unsigned char *pkt, int plen)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Based on PTPd project v. 2.1.0 (see AUTHORS for details) * Based on PTPd project v. 2.1.0 (see AUTHORS for details)
*/ */
#include <pptp/pptp.h> #include <ppsi/ppsi.h>
#include "common-fun.h" #include "common-fun.h"
int pp_uncalibrated(struct pp_instance *ppi, unsigned char *pkt, int plen) int pp_uncalibrated(struct pp_instance *ppi, unsigned char *pkt, int plen)
......
...@@ -9,13 +9,13 @@ STRIP = $(CROSS_COMPILE)strip ...@@ -9,13 +9,13 @@ STRIP = $(CROSS_COMPILE)strip
OBJCOPY = $(CROSS_COMPILE)objcopy OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump OBJDUMP = $(CROSS_COMPILE)objdump
CFLAGS = -Wall -ggdb -I../include/pptp CFLAGS = -Wall -ggdb -I../include/ppsi
PROGS = ptpdump PROGS = ptpdump
all: $(PROGS) all: $(PROGS)
$(PROGS): $(wildcard *.h) $(wildcard ../include/pptp/*.h) $(PROGS): $(wildcard *.h) $(wildcard ../include/ppsi/*.h)
%: %.c %: %.c
$(CC) $(CFLAGS) $*.c $(LDFLAGS) -o $@ $(CC) $(CFLAGS) $*.c $(LDFLAGS) -o $@
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include <net/if_arp.h> #include <net/if_arp.h>
#include <netpacket/packet.h> #include <netpacket/packet.h>
#include <ieee1588_types.h> /* from ../include/pptp */ #include <ieee1588_types.h> /* from ../include/ppsi */
#include "decent_types.h" #include "decent_types.h"
#ifndef ETH_P_1588 #ifndef ETH_P_1588
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment