Implement patty_ax25_frame_addressed_to()
This commit is contained in:
		
							parent
							
								
									f113eb4e8a
								
							
						
					
					
						commit
						c601e836fd
					
				
					 2 changed files with 13 additions and 0 deletions
				
			
		|  | @ -44,4 +44,8 @@ ssize_t patty_ax25_frame_decode(patty_ax25_frame *frame, | |||
| ssize_t patty_ax25_frame_info(patty_ax25_frame *frame, | ||||
|                               void **info); | ||||
| 
 | ||||
| int patty_ax25_frame_addresed_to(patty_ax25_frame *frame, | ||||
|                                  char *station, | ||||
|                                  uint8_t ssid); | ||||
| 
 | ||||
| #endif /* _PATTY_AX25_FRAME_H */ | ||||
|  |  | |||
|  | @ -257,3 +257,12 @@ ssize_t patty_ax25_frame_info(patty_ax25_frame *frame, | |||
| error_invalid_args: | ||||
|     return -1; | ||||
| } | ||||
| 
 | ||||
| int patty_ax25_frame_addresed_to(patty_ax25_frame *frame, | ||||
|                                  char *station, | ||||
|                                  uint8_t ssid) { | ||||
|     return strncmp(frame->dest.callsign, | ||||
|                    station, | ||||
|                    PATTY_AX25_ADDRESS_CALLSIGN_LEN) == 0 | ||||
|         && frame->dest.ssid == ssid; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue