On Fri, Apr 11, 2014 at 12:25:55PM +0200, Jiri Benc wrote:
> Also, document transport_send, transport_peer and transport_sendto usage.
> 
> Signed-off-by: Jiri Benc <jb...@redhat.com>
> ---
>  transport.c |    8 ++++++++
>  transport.h |   33 +++++++++++++++++++++++++++++++++
>  2 files changed, 41 insertions(+), 0 deletions(-)
> 
> diff --git a/transport.c b/transport.c
> index 25d569607f71..ad41f678bb19 100644
> --- a/transport.c
> +++ b/transport.c
> @@ -60,6 +60,14 @@ int transport_peer(struct transport *t, struct fdarray 
> *fda, int event,
>       return t->send(t, fda, event, msg, len, addr, &msg->hwts);
>  }
>  
> +int transport_sendto(struct transport *t, struct fdarray *fda, int event,
> +                  struct ptp_message *msg)
> +{
> +     int len = ntohs(msg->header.messageLength);
> +
> +     return t->send(t, fda, event, msg, len, &msg->address, &msg->hwts);
> +}

So this kind of wrapper function that marries the transport which the
ptp_message is fine, but please put it outside of transport.h.

Maybe call these msg_sendto() or something similar?

(msg.h already includes transport.h)

Thanks,
Richard

------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to