* ========== Copyright Header Begin ==========================================
* OpenSPARC T2 Processor File: remote.h
* Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
* The above named program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License version 2 as published by the Free Software Foundation.
* The above named program is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
* You should have received a copy of the GNU General Public
* License along with this work; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
* ========== Copyright Header End ============================================
////////////////////////////////////////////////////////////
// Copyright (C) 2005 Sun Microsystems, Inc.
// header file for Remote Interface Module
const int MAX_PORT_STEP
= 10; // DEFAULT_PORT to DEFAULT_PORT+9
const int MAX_CONNECTIONS
= 5; // allow upto 5 pending connections will never get that many
const int INTF_PORT
= 9123; // port id
// signals from the target
const int SIGNAL_HUP
= 1;
const int SIGNAL_QUIT
= 3;
const int SIGNAL_BREAKPOINT
= 5;
int port
; // tcp port id, (i.e. 9123)
/////////////////////////////////////////////////////
// Remote module exported interface
// when applicable return 0- if succeed, >0- if fail.
int (*create
) ( RemoteConfig
*config
);
int (*update_status
) ( int reason
);
typedef int (*GetRemoteIntfFn
)( RemoteExInterface
*intf
);
////////////////////////////////////////////////////////
// Get exported interface from the Remote shared library.
// Assign function pointers in the interface structure.
// return: 0 - success; 1 - fail;
extern "C" int get_ex_remote_interface
RemoteExInterface
*intf
// pointer to the interface structure