Browse Source

Now sends IP packets correctly.

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
9e32e8e513
1 changed files with 4 additions and 11 deletions
  1. 4
    11
      src/drivers/net/mlx_ipoib/mt25218.c

+ 4
- 11
src/drivers/net/mlx_ipoib/mt25218.c View File

187
 			  struct io_buffer *iobuf ) {
187
 			  struct io_buffer *iobuf ) {
188
 	struct ibhdr *ibhdr = iobuf->data;
188
 	struct ibhdr *ibhdr = iobuf->data;
189
 
189
 
190
-	DBG ( "Sending packet:\n" );
191
-	//	DBG_HD ( iobuf->data, iob_len ( iobuf ) );
192
-
193
-	DBG ( "Peer:\n" );
194
-	DBG_HD ( &ibhdr->peer[0], IB_ALEN );
195
-	DBG ( "Bcast:\n" );
196
-	DBG_HD ( &ib_broadcast[0], IB_ALEN );
197
-
198
 	iob_pull ( iobuf, sizeof ( *ibhdr ) );	
190
 	iob_pull ( iobuf, sizeof ( *ibhdr ) );	
199
 
191
 
200
 	if ( memcmp ( ibhdr->peer, ib_broadcast, IB_ALEN ) == 0 ) {
192
 	if ( memcmp ( ibhdr->peer, ib_broadcast, IB_ALEN ) == 0 ) {
201
 		printf ( "Sending broadcast packet\n" );
193
 		printf ( "Sending broadcast packet\n" );
202
-		return send_bcast_packet ( ibhdr->proto, iobuf->data,
203
-					   iob_len ( iobuf ) );
194
+		return send_bcast_packet ( ntohs ( ibhdr->proto ),
195
+					   iobuf->data, iob_len ( iobuf ) );
204
 	} else {
196
 	} else {
205
 		printf ( "Sending unicast packet\n" );
197
 		printf ( "Sending unicast packet\n" );
206
-		return send_ucast_packet ( ibhdr->peer, ibhdr->proto,
198
+		return send_ucast_packet ( ibhdr->peer,
199
+					   ntohs ( ibhdr->proto ),
207
 					   iobuf->data, iob_len ( iobuf ) );
200
 					   iobuf->data, iob_len ( iobuf ) );
208
 	}
201
 	}
209
 }
202
 }

Loading…
Cancel
Save