interface: Introduce a method to get the PHC index.
Signed-off-by: Richard Cochran <richardcochran@gmail.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
This commit is contained in:
		
							parent
							
								
									e43a76cbe6
								
							
						
					
					
						commit
						a228de7dff
					
				@ -28,6 +28,11 @@ const char *interface_name(struct interface *iface)
 | 
				
			|||||||
	return iface->name;
 | 
						return iface->name;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int interface_phc_index(struct interface *iface)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						return iface->ts_info.phc_index;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void interface_set_label(struct interface *iface, const char *label)
 | 
					void interface_set_label(struct interface *iface, const char *label)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	strncpy(iface->ts_label, label, MAX_IFNAME_SIZE);
 | 
						strncpy(iface->ts_label, label, MAX_IFNAME_SIZE);
 | 
				
			||||||
 | 
				
			|||||||
@ -53,6 +53,13 @@ const char *interface_label(struct interface *iface);
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
const char *interface_name(struct interface *iface);
 | 
					const char *interface_name(struct interface *iface);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Obtains the index of a PTP Hardware Clock device from a network interface.
 | 
				
			||||||
 | 
					 * @param iface  The interface of interest.
 | 
				
			||||||
 | 
					 * @return       The PHC index of the interface.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					int interface_phc_index(struct interface *iface);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Set the time stamping label of a given interface.
 | 
					 * Set the time stamping label of a given interface.
 | 
				
			||||||
 * @param iface  The interface of interest.
 | 
					 * @param iface  The interface of interest.
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user