Download IXP2400 Development Tools User`s Guide
Transcript
Intel® IXP2400/IXP2800 Network Processors Simulator APIs • number of (char *) args is <= 3 number of (int) args is <= 5SynopsisXACTAPI XACT_register_console_function_w_arrayed_args( char *function_name,int (*function_ptr)( char **, unsigned int * ),int num_char_ptr_args,int num_uint_args ) Returns 8.5.6 1 if function is successful, 0 otherwise. XACT_register_console_function_w_arrayed_args This function registers a foreign function with the transactor’s C interpreter.The argument list of the specified function is assumed to have the following characteristics: • only (char *) and (unsigned int) args are allowed • all (char *) args precede all (unsigned int) args. • The imported function is referenced in the console as:int function_name( specified number of char * args, specified number of unsigned int args ) • The imported function_ptr is actually called as: int (*function_ptr)( char **char_array, unsigned int *int_array ) where the char arguments are placed in the char_array from left to right starting at index 0 and the int arguments are placed in the int_array from left to right starting at index 0. Synopsis XACTAPI XACT_register_console_function( char *function_name,void *function_ptr,int num_char_ptr_args,int num_uint_args ) Returns 1 if function is successful, 0 otherwise. While the function_ptr is passed in as a void *, it will be called by the simulator as int (*function_ptr)( specified number of char * args, specified number of unsigned int args ) 8.5.7 XACT_unregister_console_function This function unregisters a routine that has been previously registered via XACT_register_console_function(). 8.5.8 Synopsis XACTAPI XACT_unregister_console_function( char *function_name ) Returns 1 if function is successful, 0 otherwise. XACT_ExecuteCommandStr Executes the str as a console command Synopsis 240 XACTAPI XACT_ExecuteCommandStr( char *cmd_str ) Development Tools User’s Guide