aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/msg.c
Commit message (Collapse)AuthorAgeFilesLines
* tipc: Eliminate useless check when creating internal messageAllan Stephens2011-06-241-4/+2
| | | | | | | | | Gets rid of code that allows tipc_msg_init() to create a short payload message header. This optimization is possible because there are no longer any callers who require this capability. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* tipc: Avoid recomputation of outgoing message lengthAllan Stephens2011-05-101-22/+3
| | | | | | | | | | | | | | | | | | | | | Rework TIPC's message sending routines to take advantage of the total amount of data value passed to it by the kernel socket infrastructure. This change eliminates the need for TIPC to compute the size of outgoing messages itself, as well as the check for an oversize message in tipc_msg_build(). In addition, this change warrants an explanation: - res = send_packet(NULL, sock, &my_msg, 0); + res = send_packet(NULL, sock, &my_msg, bytes_to_send); Previously, the final argument to send_packet() was ignored (since the amount of data being sent was recalculated by a lower-level routine) and we could just pass in a dummy value (0). Now that the recalculation is being eliminated, the argument value being passed to send_packet() is significant and we have to supply the actual amount of data we want to send. Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* tipc: Eliminate obsolete routine for handling routed messagesAllan Stephens2011-03-131-6/+0
| | | | | | | | | Eliminates a routine that is used in handling messages arriving from another cluster or zone. Such messages can no longer be received by TIPC now that multi-cluster and multi-zone network support has been eliminated. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* tipc: Eliminate remaining support for routing table messagesAllan Stephens2011-03-131-27/+0
| | | | | | | | | | Gets rid of all remaining code relating to ROUTE_DISTRIBUTOR messages. These messages were only used in multi-cluster and multi-zone networks, which TIPC no longer supports. (For safety, TIPC now treats such messages the same way that it handles other unrecognized messages.) Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* tipc: Eliminate timestamp from link protocol messagesAllan Stephens2011-03-131-1/+0
| | | | | | | | | | | | | Removes support for the timestamp field of TIPC's link protocol messages. This field was previously used to hold an OS-dependent timestamp value that was used to assist in debugging early versions of TIPC. The field has now been deemed unnecessary and has been removed from the latest TIPC specification. This change has no impact on the operation of TIPC since the field was set by TIPC, but never referenced. Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* tipc: Remove unused message header field for requested number of linksAllan Stephens2011-02-231-1/+0
| | | | | | | | | Eliminates support for the "number of requested links" field in a neighbor discovery message. This field was never used and has been removed from the TIPC 2.0 protocol specification. Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* tipc: Remove support for per-connection message sequence numberingAllan Stephens2011-02-231-5/+1
| | | | | | | | | | | Eliminates TIPC's prototype support for message sequence numbering on routable connections (i.e. connections requiring more than one hop). This capability isn't currently used, and can be removed since TIPC only supports systems in which all inter-node communication can be achieved in a single hop. Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* tipc: remove extraneous braces from single statementsAllan Stephens2011-01-011-9/+6
| | | | | | | | | | | | Cleans up TIPC's source code to eliminate the presence of unnecessary use of {} around single statements. These changes are purely cosmetic and do not alter the operation of TIPC in any way. Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tipc: cleanup various cosmetic whitespace issuesAllan Stephens2011-01-011-28/+28
| | | | | | | | | | | | | Cleans up TIPC's source code to eliminate deviations from generally accepted coding conventions relating to leading/trailing white space and white space around commas, braces, cases, and sizeof. These changes are purely cosmetic and do not alter the operation of TIPC in any way. Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tipc: remove redundant #includesAllan Stephens2011-01-011-1/+0
| | | | | | | | | Eliminates a number of #include statements that no longer serve any useful purpose. Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tipc: Finish streamlining of debugging codeAllan Stephens2011-01-011-0/+1
| | | | | | | | | | | | | Completes the simplification of TIPC's debugging capabilities. By default TIPC includes no debugging code, and any debugging code added by developers that calls the dbg() and dbg_macros() is compiled out. If debugging support is enabled, TIPC prints out some additional data about its internal state when certain abnormal conditions occur, and any developer-added calls to the TIPC debug macros are compiled in. Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tipc: Remove obsolete inclusions of header filesAllan Stephens2010-12-021-2/+0
| | | | | | | | | | Gets rid of #include statements that are no longer required as a result of the merging of obsolete native API header file content into other TIPC include files. Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tipc: cleanup function namespacestephen hemminger2010-10-161-1/+1
| | | | | | | | | | | | | | | | Do some cleanups of TIPC based on make namespacecheck 1. Don't export unused symbols 2. Eliminate dead code 3. Make functions and variables local 4. Rename buf_acquire to tipc_buf_acquire since it is used in several files Compile tested only. This make break out of tree kernel modules that depend on TIPC routines. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Jon Maloy <jon.maloy@ericsson.com> Acked-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tipc: Reduce footprint by un-inlining tipc_msg_* routinesAllan Stephens2010-05-121-0/+94
| | | | | | | | | Convert tipc_msg_* inline routines that are more than one line into standard functions, thereby eliminating some repeated code. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tipc: Fix bugs in message error code display when debuggingAllan Stephens2008-06-041-3/+0
| | | | | | | | | | | | This patch corrects two problems in the display of error code information in TIPC messages when debugging: - no longer tries to display error code in NAME_DISTRIBUTOR messages, which don't have the error field - now displays error code in 24 byte data messages, which do have the error field Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tipc: Exclude debug-only print buffer code when not debuggingAllan Stephens2008-05-051-3/+7
| | | | | | | | | This patch modifies TIPC to only exclude debug-related print buffer routines when debugging capabilities are not required. It also fixes up some related #defines that exceed 80 characters. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [TIPC]: Minor cleanup of message header codeAllan Stephens2008-03-061-8/+8
| | | | | | | | | This patch eliminates some unused or duplicate message header symbols, and fixes up the comments and/or location of a few other symbols. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET] TIPC: Fix whitespace errors.YOSHIFUJI Hideaki2007-02-101-1/+1
| | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [TIPC] Avoid polluting the global namespacePer Liden2006-01-181-15/+4
| | | | | | This patch adds a tipc_ prefix to all externally visible symbols. Signed-off-by: Per Liden <per.liden@ericsson.com>
* [TIPC] More updates of file headersPer Liden2006-01-121-1/+1
| | | | | | | | | Updated copyright notice to include the year the file was actually created. Information about file creation dates was extracted from the files in the old CVS repository at tipc.sourceforge.net. Signed-off-by: Per Liden <per.liden@nospam.ericsson.com>
* [TIPC] Update of file headersPer Liden2006-01-121-2/+1
| | | | | | | The copyright statements from different parts of Ericsson have been merged into one. Signed-off-by: Per Liden <per.liden@nospam.ericsson.com>
* [TIPC] License header updatePer Liden2006-01-121-19/+23
| | | | | | | | The license header in each file now more clearly state that this code is licensed under a dual BSD/GPL. Before this was only evident if you looked at the MODULE_LICENSE line in core.c. Signed-off-by: Per Liden <per.liden@nospam.ericsson.com>
* [TIPC] Initial mergePer Liden2006-01-121-0/+331
TIPC (Transparent Inter Process Communication) is a protocol designed for intra cluster communication. For more information see http://tipc.sourceforge.net Signed-off-by: Per Liden <per.liden@nospam.ericsson.com>