X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=net%2Frxrpc%2Fconnection.c;h=a978007bff4d1f26c2348c50d1704ff63ae4a4d5;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=929b82f48aeba9a91b5baf6e12354109de4235bf;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/net/rxrpc/connection.c b/net/rxrpc/connection.c index 929b82f48..a978007bf 100644 --- a/net/rxrpc/connection.c +++ b/net/rxrpc/connection.c @@ -88,8 +88,8 @@ static inline int __rxrpc_create_connection(struct rxrpc_peer *peer, * create a new connection record for outgoing connections */ int rxrpc_create_connection(struct rxrpc_transport *trans, - uint16_t port, - uint32_t addr, + __be16 port, + __be32 addr, uint16_t service_id, void *security, struct rxrpc_connection **_conn) @@ -97,7 +97,7 @@ int rxrpc_create_connection(struct rxrpc_transport *trans, struct rxrpc_connection *candidate, *conn; struct rxrpc_peer *peer; struct list_head *_p; - uint32_t connid; + __be32 connid; int ret; _enter("%p{%hu},%u,%hu", trans, trans->port, ntohs(port), service_id); @@ -169,7 +169,7 @@ int rxrpc_create_connection(struct rxrpc_transport *trans, spin_unlock(&peer->conn_gylock); /* pick the new candidate */ - _debug("created connection: {%08x} [out]", htonl(candidate->conn_id)); + _debug("created connection: {%08x} [out]", ntohl(candidate->conn_id)); atomic_inc(&peer->conn_count); conn = candidate; candidate = NULL; @@ -199,7 +199,7 @@ int rxrpc_create_connection(struct rxrpc_transport *trans, /* handle resurrecting a connection from the graveyard */ found_in_graveyard: - _debug("resurrecting connection: {%08x} [out]", htonl(conn->conn_id)); + _debug("resurrecting connection: {%08x} [out]", ntohl(conn->conn_id)); rxrpc_get_connection(conn); rxrpc_krxtimod_del_timer(&conn->timeout); list_del_init(&conn->link); @@ -219,8 +219,9 @@ int rxrpc_connection_lookup(struct rxrpc_peer *peer, struct rxrpc_connection *conn, *candidate = NULL; struct list_head *_p; int ret, fresh = 0; - u32 x_epoch, x_connid; - u16 x_port, x_secix, x_servid; + __be32 x_epoch, x_connid; + __be16 x_port, x_servid; + __u32 x_secix; u8 x_clflag; _enter("%p{{%hu}},%u,%hu", @@ -310,7 +311,7 @@ int rxrpc_connection_lookup(struct rxrpc_peer *peer, } /* we can now add the new candidate to the list */ - _debug("created connection: {%08x} [in]", htonl(candidate->conn_id)); + _debug("created connection: {%08x} [in]", ntohl(candidate->conn_id)); rxrpc_get_peer(peer); conn = candidate; candidate = NULL; @@ -351,7 +352,7 @@ int rxrpc_connection_lookup(struct rxrpc_peer *peer, /* handle resurrecting a connection from the graveyard */ found_in_graveyard: - _debug("resurrecting connection: {%08x} [in]", htonl(conn->conn_id)); + _debug("resurrecting connection: {%08x} [in]", ntohl(conn->conn_id)); rxrpc_get_peer(peer); rxrpc_get_connection(conn); rxrpc_krxtimod_del_timer(&conn->timeout); @@ -397,7 +398,7 @@ void rxrpc_put_connection(struct rxrpc_connection *conn) } /* move to graveyard queue */ - _debug("burying connection: {%08x}", htonl(conn->conn_id)); + _debug("burying connection: {%08x}", ntohl(conn->conn_id)); list_del(&conn->link); list_add_tail(&conn->link, &peer->conn_graveyard); @@ -442,7 +443,7 @@ void rxrpc_conn_do_timeout(struct rxrpc_connection *conn) } _debug("--- Destroying Connection %p{%08x} ---", - conn, htonl(conn->conn_id)); + conn, ntohl(conn->conn_id)); down_write(&rxrpc_conns_sem); list_del(&conn->proc_link); @@ -640,8 +641,8 @@ int rxrpc_conn_sendmsg(struct rxrpc_connection *conn, _net("Sending message type %d of %Zd bytes to %08x:%d", msg->hdr.type, msg->dsize, - htonl(conn->addr.sin_addr.s_addr), - htons(conn->addr.sin_port)); + ntohl(conn->addr.sin_addr.s_addr), + ntohs(conn->addr.sin_port)); /* send the message */ ret = kernel_sendmsg(conn->trans->socket, &msghdr, @@ -699,11 +700,11 @@ int rxrpc_conn_receive_call_packet(struct rxrpc_connection *conn, } _proto("Received packet %%%u [%u] on call %hu:%u:%u", - htonl(msg->hdr.serial), - htonl(msg->hdr.seq), - htons(msg->hdr.serviceId), - htonl(conn->conn_id), - htonl(call->call_id)); + ntohl(msg->hdr.serial), + ntohl(msg->hdr.seq), + ntohs(msg->hdr.serviceId), + ntohl(conn->conn_id), + ntohl(call->call_id)); call->pkt_rcv_count++;