There a number of posts on connect that mention this.
There are a number of Reports you could look at in the SMP for how it gets Package information
You can get Sites from vSiteServices.
SubNet comparison
Another option is to use IP address of the computer and see if it is in the same subnet as the Package server.
The Agents checks using the following URL
http://SMPServer/Altiris/Deployment/Agent/GetNearestPackageServerInfo.aspx?xml=""
siteType = "taskserver";
siteType = "packageserver";
strXML = "<request>" +
"<GetNearestPackageServerInfo>" +
"<clientIPAddress>" + clientIPAddress + "</clientIPAddress>" +
"<siteType>" + siteType + "</siteType>" +
"</GetNearestPackageServerInfo>" +
"</request>";