Use mac_to_str
This commit is contained in:
		
							parent
							
								
									933ef7bab2
								
							
						
					
					
						commit
						e0cec73349
					
				
					 2 changed files with 5 additions and 12 deletions
				
			
		| 
						 | 
					@ -510,8 +510,7 @@ int ethsock_list_all(void)
 | 
				
			||||||
			printf("  %-15s", "0.0.0.0");
 | 
								printf("  %-15s", "0.0.0.0");
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		printf("  %02x:%02x:%02x:%02x:%02x:%02x", hwaddr[0], hwaddr[1],
 | 
							printf("  %s", mac_to_str(hwaddr));
 | 
				
			||||||
				hwaddr[2], hwaddr[3], hwaddr[4], hwaddr[5]);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef NMRPFLASH_WINDOWS
 | 
					#ifdef NMRPFLASH_WINDOWS
 | 
				
			||||||
		if (pretty) {
 | 
							if (pretty) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										14
									
								
								nmrp.c
									
										
									
									
									
								
							
							
						
						
									
										14
									
								
								nmrp.c
									
										
									
									
									
								
							| 
						 | 
					@ -381,11 +381,8 @@ int nmrp_do(struct nmrpd_args *args)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		switch (rx.msg.code) {
 | 
							switch (rx.msg.code) {
 | 
				
			||||||
			case NMRP_C_ADVERTISE:
 | 
								case NMRP_C_ADVERTISE:
 | 
				
			||||||
				printf("Received NMRP advertisement from "
 | 
									printf("Received NMRP advertisement from %s.\n",
 | 
				
			||||||
						"%02x:%02x:%02x:%02x:%02x:%02x.\n",
 | 
											mac_to_str(rx.eh.ether_shost));
 | 
				
			||||||
						rx.eh.ether_shost[0], rx.eh.ether_shost[1],
 | 
					 | 
				
			||||||
						rx.eh.ether_shost[2], rx.eh.ether_shost[3],
 | 
					 | 
				
			||||||
						rx.eh.ether_shost[4], rx.eh.ether_shost[5]);
 | 
					 | 
				
			||||||
				err = 1;
 | 
									err = 1;
 | 
				
			||||||
				goto out;
 | 
									goto out;
 | 
				
			||||||
			case NMRP_C_CONF_REQ:
 | 
								case NMRP_C_CONF_REQ:
 | 
				
			||||||
| 
						 | 
					@ -403,11 +400,8 @@ int nmrp_do(struct nmrpd_args *args)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				expect = NMRP_C_TFTP_UL_REQ;
 | 
									expect = NMRP_C_TFTP_UL_REQ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				printf("Received configuration request from "
 | 
									printf("Received configuration request from %s.\n",
 | 
				
			||||||
						"%02x:%02x:%02x:%02x:%02x:%02x.\n",
 | 
											mac_to_str(rx.eh.ether_shost));
 | 
				
			||||||
						rx.eh.ether_shost[0], rx.eh.ether_shost[1],
 | 
					 | 
				
			||||||
						rx.eh.ether_shost[2], rx.eh.ether_shost[3],
 | 
					 | 
				
			||||||
						rx.eh.ether_shost[4], rx.eh.ether_shost[5]);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
				memcpy(tx.eh.ether_dhost, rx.eh.ether_shost, 6);
 | 
									memcpy(tx.eh.ether_dhost, rx.eh.ether_shost, 6);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue