Merge branch 'rename-packet-to-message' into libradsec-user-dispatch
authorLinus Nordberg <linus@nordberg.se>
Thu, 24 Jan 2013 14:19:43 +0000 (15:19 +0100)
committerLinus Nordberg <linus@nordberg.se>
Thu, 24 Jan 2013 14:19:43 +0000 (15:19 +0100)
Conflicts:
lib/include/radsec/radsec.h

Original commit message (1e3a2613):

    Rename most 'package' to 'message'.

    RADIUS (RFC2865) is defined to be transported over UDP so the term
    "radius packet" makes a lot of sense. RADIUS/TCP (RFC6613) and
    RADIUS/TLS (RFC6614), a.k.a. RadSec, use stream transport protocols
    though. The term "message" doesn't imply any kind of transport -- a
    message can be sent using datagrams as well as in a stream.

    This (large) commit changes 'package' to 'message' where it makes
    sense. It does not touch the 'radius' subdirectory. It includes
    preprocessor directives (#define) to make the public interface
    compatible with previous releases of the library.

1  2 
lib/CHANGES
lib/conn.c
lib/include/radsec/radsec.h
lib/radsec.sym

diff --cc lib/CHANGES
index d293cba,0000000..135fd4b
mode 100644,000000..100644
--- /dev/null
@@@ -1,6 -1,0 +1,8 @@@
-   libradsec 0.0.3 <verb> <other words, forming a summary>
 +Changes in version 0.0.3 - 2013-??-??
-   [o Incompatible changes:]
-   [o Features:]
-   [o Bug fixes:]
++  libradsec 0.0.3 <summary goes here>
 +
++  o Compatible internal code changes:
++    - Most places that used to say 'packet' now say 'message',
++      including public API:s. Preprocessor directives (#define) are in
++      place to make the public interface compatible with previous
++      releases.
diff --cc lib/conn.c
Simple merge
@@@ -199,12 -214,13 +214,12 @@@ int rs_context_read_config(struct rs_co
  /** Create a connection.  \a conn is the address of a pointer to an \a
      rs_connection, the output.  Free the connection using \a
      rs_conn_destroy.  Note that a connection must not be freed before
-     all packets associated with the connection have been freed.  A
-     packet is associated with a connection when it's created (\a
-     rs_packet_create) or received (\a rs_conn_receive_packet).
+     all messages associated with the connection have been freed.  A
+     message is associated with a connection when it's created
+     (\a rs_message_create) or received (\a rs_conn_receive_message).
  
      If \a config is not NULL it should be the name of a realm found in
 -    a config file that has already been read using \a
 -    rs_context_read_config.
 +    a config file that has already been read using \a rs_context_read_config.
  
      \return On success, RSE_OK (0) is returned.  On error, !0 is
      returned and a struct \a rs_error is pushed on the error stack for
@@@ -268,25 -284,13 +283,25 @@@ int rs_conn_get_current_peer(struct rs_
      \return On error or if the connect (TCP only) or read times out,
      \a pkt_out will not be changed and one or more errors are pushed
      on \a conn (available through \a rs_err_conn_pop).  */
- int rs_conn_receive_packet(struct rs_connection *conn,
-                          struct rs_packet *request,
-                          struct rs_packet **pkt_out);
+ int rs_conn_receive_message(struct rs_connection *conn,
+                             struct rs_message *request,
+                             struct rs_message **pkt_out);
  
 +/** Run the dispatcher for the event base associated with \a conn. A
 + * wrapper around event_base_dispatch() for not having to hand out the
 + * event base. */
 +int rs_conn_dispatch(struct rs_connection *conn);
 +
 +#if 0
 +/** Get the event base associated with connection \a conn.
 + * \return struct event_base*. */
 +struct event_base *rs_conn_get_evb(const struct rs_connection *conn);
 +#endif
 +
 +#define rs_conn_fd rs_conn_get_fd /* Old name. */
  /** Get the file descriptor associated with connection \a conn.
   * \return File descriptor.  */
 -int rs_conn_fd(struct rs_connection *conn);
 +int rs_conn_get_fd(struct rs_connection *conn);
  
  /** Set the timeout value for connection \a conn.  */
  void rs_conn_set_timeout(struct rs_connection *conn, struct timeval *tv);
diff --cc lib/radsec.sym
Simple merge