interface: Introduce a method to test the time stamping information validity.
Signed-off-by: Richard Cochran <richardcochran@gmail.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
This commit is contained in:
		
							parent
							
								
									02bbf36c2a
								
							
						
					
					
						commit
						3d388e1992
					
				@ -42,3 +42,8 @@ void interface_set_name(struct interface *iface, const char *name)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	strncpy(iface->name, name, MAX_IFNAME_SIZE);
 | 
						strncpy(iface->name, name, MAX_IFNAME_SIZE);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					bool interface_tsinfo_valid(struct interface *iface)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						return iface->ts_info.valid ? true : false;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -7,6 +7,7 @@
 | 
				
			|||||||
#ifndef HAVE_INTERFACE_H
 | 
					#ifndef HAVE_INTERFACE_H
 | 
				
			||||||
#define HAVE_INTERFACE_H
 | 
					#define HAVE_INTERFACE_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <stdbool.h>
 | 
				
			||||||
#include <sys/queue.h>
 | 
					#include <sys/queue.h>
 | 
				
			||||||
#include "sk.h"
 | 
					#include "sk.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -74,4 +75,11 @@ void interface_set_label(struct interface *iface, const char *label);
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
void interface_set_name(struct interface *iface, const char *name);
 | 
					void interface_set_name(struct interface *iface, const char *name);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Tests whether an interface's time stamping information is valid or not.
 | 
				
			||||||
 | 
					 * @param iface  The interface of interest.
 | 
				
			||||||
 | 
					 * @return       True if the time stamping information is valid, false otherwise.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					bool interface_tsinfo_valid(struct interface *iface);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user