PPSi:6f7961f05d70a182aeba0d9c4ca21efaaba6bdf8 commitshttps://ohwr.org/project/ppsi/commits/6f7961f05d70a182aeba0d9c4ca21efaaba6bdf82012-01-03T15:29:09Zhttps://ohwr.org/project/ppsi/commit/6f7961f05d70a182aeba0d9c4ca21efaaba6bdf8arch-bare-linux: make it compile (but not link, yet)2012-01-03T15:29:09ZAlessandro Rubinirubini@gnudd.com
This fixes the "ppi->ch.fd" using the two descriptors
in the new net_path structure. It also istantiates a static
net_patch to avoid malloc in the freestanding environment.
The program is not linking because some functions called by
the protocol are still missing in this architecture.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/66d77e019e8d043e9e3484fc6ec8ab36ab8a7894trivial: fill two places in posix-socket.c2012-01-03T15:29:09ZAlessandro Rubinirubini@gnudd.com
Since we have two file descriptors (channels) in pp_instance, but current
code opens one socket only, use it in both places as a temporary measure.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>
Acked-by: <span data-trailer="Acked-by:" data-user="9330"><a href="https://ohwr.org/colosimo" title="aurelio@aureliocolosimo.it"><img alt="Aurelio Colosimo's avatar" src="https://secure.gravatar.com/avatar/ea28c1ebbd590d5c6a0a917817345c16?s=32&d=identicon" class="avatar s16 avatar-inline" title="Aurelio Colosimo"></a><a href="https://ohwr.org/colosimo" title="aurelio@aureliocolosimo.it">Aurelio Colosimo</a> <<a href="mailto:aurelio@aureliocolosimo.it" title="aurelio@aureliocolosimo.it">aurelio@aureliocolosimo.it</a>></span>https://ohwr.org/project/ppsi/commit/0177a213fb2dbf99fd1737f4026e9b3382ca5a52include: rename dep.h to lib.h, and add pp_printf to diag.h2012-01-03T15:28:59ZAlessandro Rubinirubini@gnudd.com
This removes <dep/dep.h> by renaming it to <pproto/lib.h>, since those
functions are library ones, though pp_ prefixed.
<pproto/pproto.h> includes <pproto/lib.h>, since they are always needed,
and C files are fixed by not including <dep/dep.h>. Sometimes I included
<pproto/diag.h> to fix some compile warnings for implicit declaration of
pp_printf.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>
Acked-by: <span data-trailer="Acked-by:" data-user="9330"><a href="https://ohwr.org/colosimo" title="aurelio@aureliocolosimo.it"><img alt="Aurelio Colosimo's avatar" src="https://secure.gravatar.com/avatar/ea28c1ebbd590d5c6a0a917817345c16?s=32&d=identicon" class="avatar s16 avatar-inline" title="Aurelio Colosimo"></a><a href="https://ohwr.org/colosimo" title="aurelio@aureliocolosimo.it">Aurelio Colosimo</a> <<a href="mailto:aurelio@aureliocolosimo.it" title="aurelio@aureliocolosimo.it">aurelio@aureliocolosimo.it</a>></span>https://ohwr.org/project/ppsi/commit/ca2f8041f20b1be5765665eee0fbd80e6996cab0all states implemented, with many TODO still to be fixed2011-12-30T14:17:38ZAurelio Colosimoaurelio@aureliocolosimo.it
With this patch, the whole ptp protocol state machine has been analyzed
and mostly included in the ptp-wr project.https://ohwr.org/project/ppsi/commit/db50f0753f31431a5efbb085b9c52277b9762615state-initializing: pp_init_clock skeleton is now present, use it2011-12-30T13:11:44ZAurelio Colosimoaurelio@aureliocolosimo.ithttps://ohwr.org/project/ppsi/commit/b2d0a4006d571873286b4aa2324cb4e8d582a9d5return type of msg_copy_header set to void *2011-12-30T13:10:58ZAurelio Colosimoaurelio@aureliocolosimo.it
fixes a warning on return typehttps://ohwr.org/project/ppsi/commit/be9a05d97c144b7a94fc034638ca06b0b4d19d1ffix state machine when announce timer expires2011-12-30T08:27:38ZAurelio Colosimoaurelio@aureliocolosimo.it
fix for coherency with ptpd: if announce timer expires and our clock can not
act as master, the state must be put back to LISTENINGhttps://ohwr.org/project/ppsi/commit/32ade967bcf6324744a5060c335f20a4f4a663ecstate-common-fun: st_com_handle_pdelay_req implemented2011-12-30T08:17:26ZAurelio Colosimoaurelio@aureliocolosimo.it
state-passive.c and state-slave.c now use the same st_com_handle_pdelay_req
for PPM_PDELAY_REQ messages handling.https://ohwr.org/project/ppsi/commit/9919387ee66fd3a61f4ed7878507c1c9ffbbc3e4state-slave almost completed2011-12-30T08:01:25ZAurelio Colosimoaurelio@aureliocolosimo.it
state-slave.c: only missing some servo functions and msg issue
pproto.h: shortened some variable nameshttps://ohwr.org/project/ppsi/commit/683dc4436a0c8ec620274cea70432833a474106dstate-common-fun: handle uncorrect length in follow up message2011-12-29T18:32:00ZAurelio Colosimoaurelio@aureliocolosimo.ithttps://ohwr.org/project/ppsi/commit/3c5a85c9f5e20c0e7bb7b5a5168a8082e42eb3e9state-slave first partial implementation2011-12-29T18:25:18ZAurelio Colosimoaurelio@aureliocolosimo.it
minor fixes and comments updated elsewherehttps://ohwr.org/project/ppsi/commit/caee5bbef3bb274c89f2ac6754b3bb7cea4fcf7bproto/MAKEALL: avoid function keyword: dash complains2011-12-29T17:51:33ZAlessandro Rubinirubini@gnudd.comhttps://ohwr.org/project/ppsi/commit/9ecb15636140826dd6eed7d1d99a9c6fcdebe669bare-linux.lds: move entry point2011-12-29T17:51:33ZAlessandro Rubinirubini@gnudd.com
With new compilers (e.g., Debian 6) the resulting binary
was not starting because there's an extra section before .texthttps://ohwr.org/project/ppsi/commit/987288dc18a70d9a0a177ddebc85db2c514f6b0bstate-uncalibrated: handle followup and sync2011-12-29T08:57:05ZAurelio Colosimoaurelio@aureliocolosimo.ithttps://ohwr.org/project/ppsi/commit/6abaeb9072673400d82aaafada94cc825158b30fstate-uncalibrated first implementation2011-12-28T14:58:22ZAurelio Colosimoaurelio@aureliocolosimo.ithttps://ohwr.org/project/ppsi/commit/11ee8a2d51edc08ae0a5e9544a8619044dfa58a7improved readability and minor fix2011-12-28T14:56:54ZAurelio Colosimoaurelio@aureliocolosimo.it
state-listening: go to FAULTY if received an announce of uncorrect
length
all states: use switch/case to analyse the incoming msg typehttps://ohwr.org/project/ppsi/commit/4bf77d71d72ead4d67ce86ba45ac00b5d4325fa7trivial: header renamed to hdr and whitespaces fix2011-12-28T14:04:37ZAurelio Colosimoaurelio@aureliocolosimo.ithttps://ohwr.org/project/ppsi/commit/c773d09b81955d7e461918340b0b26b08d91f85astruct timeval tv moved to posix_arch_data (is arch dependent)2011-12-28T09:38:07ZAurelio Colosimoaurelio@aureliocolosimo.ithttps://ohwr.org/project/ppsi/commit/b41b238e254b7d06281d63393734e6a040337a13arch-bare-linux/Makefile: add -fno-stack-protector2011-12-28T09:25:03ZAurelio Colosimoaurelio@aureliocolosimo.it
Patch coming from ptp-proposal (author: Alessandro Rubini)
Some distributions (e.g: ubuntu-lucid) use the stack protector by
default. This disables it so arch-bare-linux can compile and run.
The option is present at least from gcc-4.2, but 4.0 and ealier ones
are known not to accept it.https://ohwr.org/project/ppsi/commit/ec332e3f6c2da3f4fb6702305c338a8bc8aeb2c0handling of is_from_self flag2011-12-28T08:17:53ZAurelio Colosimoaurelio@aureliocolosimo.ithttps://ohwr.org/project/ppsi/commit/26ea047c9ba47ca25d72370993179092b5fe0776fix compilation error (PP_DEFAULT_NEXT_DELAY_MS was misspelled)2011-12-28T08:14:48ZAurelio Colosimoaurelio@aureliocolosimo.ithttps://ohwr.org/project/ppsi/commit/63e90550f3d8fafe2fb6aafbd433d42ef5e5bae9next_delay handled with a default value2011-12-28T07:53:06ZAurelio Colosimoaurelio@aureliocolosimo.ithttps://ohwr.org/project/ppsi/commit/18deb6e06aa6c8e26c1b39c7d3ad59722753a999first (partial) implementation of state-passive2011-12-27T16:49:13ZAurelio Colosimoaurelio@aureliocolosimo.ithttps://ohwr.org/project/ppsi/commit/56037781c8db10513f05e94cdb31e29017308cbbnew src state-common-fun.[ch], containing common stuff for many states2011-12-27T16:44:01ZAurelio Colosimoaurelio@aureliocolosimo.ithttps://ohwr.org/project/ppsi/commit/6a689c882e4e93e24566b0288e1caae2b1e9151dtrivial: removed unused variable2011-12-27T16:42:23ZAurelio Colosimoaurelio@aureliocolosimo.ithttps://ohwr.org/project/ppsi/commit/ed95835a4d69dcdc752c294b848c2cf3dd74d581state-listening: record_update must be checked every time2011-12-22T10:37:13ZAurelio Colosimoaurelio@aureliocolosimo.ithttps://ohwr.org/project/ppsi/commit/3364f3144a1f2cc19572fce2d8a72fdd76a0e302state-listening: stop timer when leaving the state2011-12-22T09:42:35ZAurelio Colosimoaurelio@aureliocolosimo.ithttps://ohwr.org/project/ppsi/commit/f2ec976661383d8791e92e76c601bab23e05754fstate-listening partly completed. Still missing addForeign and issue msgs.2011-12-22T09:11:24ZAurelio Colosimoaurelio@aureliocolosimo.ithttps://ohwr.org/project/ppsi/commit/14c4b9847ecca862d33ca27e213cf2f22c110fdefix compilation of htonl/htons wrappers: was misspelled2011-12-22T09:09:11ZAurelio Colosimoaurelio@aureliocolosimo.ithttps://ohwr.org/project/ppsi/commit/e40d6dc00450625c45dac021b9e02660f285c43fstate-initializing completed2011-12-21T15:35:31ZAurelio Colosimoaurelio@aureliocolosimo.ithttps://ohwr.org/project/ppsi/commit/2e56afafc90f8f18b9925dd15a3435c49ea1cb4fnetwork functions implementation for posix2011-12-19T10:23:35ZAurelio Colosimoaurelio@aureliocolosimo.ithttps://ohwr.org/project/ppsi/commit/fdd9844d7bf0b38dbe584df07d1fd8f536db4f60Integration of arith.c file, containing functions for time handling2011-12-16T09:27:05ZAurelio Colosimoaurelio@aureliocolosimo.ithttps://ohwr.org/project/ppsi/commit/67823708a44b1c69b223b5e4ec0c6d81efac5746arith.c copied from ptpd-2.1.0 project2011-12-16T08:54:49ZAurelio Colosimoaurelio@aureliocolosimo.ithttps://ohwr.org/project/ppsi/commit/bf9090c67ea2d9d73937cfa39782fd9de223aaeefix return value -1 when calloc fails2011-12-12T11:28:23ZAurelio Colosimoaurelio@aureliocolosimo.ithttps://ohwr.org/project/ppsi/commit/d51706696d08ad81c7a019099e8fb25f1a7ac456var announce shortened to ann2011-12-12T11:24:40ZAurelio Colosimoaurelio@aureliocolosimo.ithttps://ohwr.org/project/ppsi/commit/74da3f32eaff5c7bcb981ff8d0ed3a2dccfe4ccfintegration of msg.c src file, containing function for message handling2011-12-12T10:29:13ZAurelio Colosimoaurelio@aureliocolosimo.ithttps://ohwr.org/project/ppsi/commit/86c25f77a7502a6e10d54ceaf42faf9801d23f1bmsg.c copied from ptpd-2.1.0 project2011-12-12T09:42:57ZAurelio Colosimoaurelio@aureliocolosimo.ithttps://ohwr.org/project/ppsi/commit/daaad9bac9b5344edd9b1cdb70240408cb250c92removed empty lines at end of file2011-12-12T08:58:25ZAurelio Colosimoaurelio@aureliocolosimo.ithttps://ohwr.org/project/ppsi/commit/45bdac08cef1f4c56ebd44d98fa5a70a9b53103dbmc (Best Master Clock) copied and adapted from ptpd src2011-12-09T15:14:31ZAurelio Colosimoaurelio@aureliocolosimo.it
it compiles and should work. Some code-style rewriting was done, but there
still is a portion of code to be fixed. Also missing diagnostic messages.https://ohwr.org/project/ppsi/commit/4379f25332ca4dc717a3b6ef65ea66268a6224d0struct name corrected, compliant to IEEE 15882011-12-09T15:00:53ZAurelio Colosimoaurelio@aureliocolosimo.it