Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 04-13-2014, 01:53 PM
daerath
Sarnak
 
Join Date: Jan 2011
Location: Northern VA
Posts: 91
Default CRC missing during login?

I noticed in some recent packet captures between my machine and the Emu's login server that the CRC key isn't being set (0x11223344) on the OP_SessionResponse (the server's first packet back to the client) and that the subsequent packets from the client do not include a CRC. I looked at some notes from a year ago and those definitely had an extra 2 bytes for the CRC.

I haven't checked the behavior between the client and game server yet. Why was this change made?
Reply With Quote
  #2  
Old 04-30-2014, 07:09 AM
daerath
Sarnak
 
Join Date: Jan 2011
Location: Northern VA
Posts: 91
Default Resolved

Posting this because I hate threads that go dormant and unanswered, and I figured the 200+ views and 0 responses meant that nobody had the answer.

Short answer. The emu source doesn't exhibit this behavior and instead sets the CRC Key as expected. Logging in from the public login server to an emu server appears to set the CRCKey, so my concern that a change caused the CRCKey to get dropped entirely are not valid.

Oh, and on an unrelated note. If any of you have MSDN subscriptions, make sure to use your monthly Azure credit. I set up my Emu dev and test environment on an Azure VM and it's fantastic. =)
Reply With Quote
  #3  
Old 04-30-2014, 07:16 AM
vsab's Avatar
vsab
Discordant
 
Join Date: Apr 2014
Location: United Kingdom
Posts: 276
Default

Hah, I never thought of hosting it on Azure. I missed my chance to be put into the draw for an Aston Martin though. They make them literally down the road from me so I see lots, but they are sooo nice
Reply With Quote
  #4  
Old 04-30-2014, 07:58 AM
daerath
Sarnak
 
Join Date: Jan 2011
Location: Northern VA
Posts: 91
Default

Quote:
Originally Posted by vsab View Post
Hah, I never thought of hosting it on Azure. I missed my chance to be put into the draw for an Aston Martin though. They make them literally down the road from me so I see lots, but they are sooo nice
The best part is that you can scale up to a more powerful VM with a few mouse clicks. Same is true if you want to downgrade the VM to one with fewer cores and RAM. The only "tough" part was adding VM endpoints for ports 5998, 5999, 9000, and 7000-7100. The current page to set those up doesn't do ranges, so I had to write a quick powershell script to do it because I wasn't going to do that manually.

Ok, so not really tough. Just a, "damnit. Why the hell can't I just put in a hyphen like I can in the Windows Firewall Rule wizard."

You'd have to use a non-MSDN Azure instance to host a non-dev Emu to avoid violating the MSDN terms of use, but for dev and test it's ideal.
Reply With Quote
  #5  
Old 04-30-2014, 08:23 AM
vsab's Avatar
vsab
Discordant
 
Join Date: Apr 2014
Location: United Kingdom
Posts: 276
Default

I would have thought it would be cost prohibitive to host a live server that way. Can you PM me that PS script? I'm dead lazy hehe
Reply With Quote
  #6  
Old 04-30-2014, 09:25 AM
daerath
Sarnak
 
Join Date: Jan 2011
Location: Northern VA
Posts: 91
Default

Quote:
Originally Posted by vsab View Post
I would have thought it would be cost prohibitive to host a live server that way. Can you PM me that PS script? I'm dead lazy hehe
I'll check the pricing for a non-MSDN subscription and see what it is for the various VM configurations. It is going to be more expensive than hosting a server out of your house because you get dual purpose from a home high speed internet connection, but that's the same for using any hosting service.

Does Azure hosting cost more than Akkadius's hosting business? Probably, but then again, I haven't checked the cost compared to the various Azure VM pricing models.

Now, if you re-wrote the whole Emu to run as a series of Azure Worker roles on SQL Azure instead of using VMs, you might see a huge cost reduction, but now're you facing the difficulty of rewriting some or all of the entire Emu. That becomes cost prohibitive for entirely separate reasons. =P

I'll post the script in this thread.
Reply With Quote
  #7  
Old 04-30-2014, 09:33 AM
vsab's Avatar
vsab
Discordant
 
Join Date: Apr 2014
Location: United Kingdom
Posts: 276
Default

Heh well no home hosting for me that's for sure. It'd be nice to have a euro based server though, I get ping times of 250+ on most eqemu servers, which is what I got with 56k dialup "back in the day".

And to be honest there's more than enough dev work for me to do without having to host Yet Another Server with 5 players
Reply With Quote
  #8  
Old 04-30-2014, 09:35 AM
daerath
Sarnak
 
Join Date: Jan 2011
Location: Northern VA
Posts: 91
Default

How to install and configure Windows Azure Powershell
http://azure.microsoft.com/en-us/doc...re-powershell/

1. On your VM navigate to: http://go.microsoft.com/fwlink/p/?li...76&clcid=0x409
2. Run the file you are prompted to download. At this moment it will open the Web Platform Installer 4.6.
3. Click Install.
4. Click I Accept.
5. Wait for it to finish. Time varies based on your chosen VM size. An A1 (1 core, 1.75 GB RAM) will take a bit. On my A3 (4 cores, 7GB RAM) it went pretty quickly.
6. Click Finish.
7. Click Exit.

Get your Publish Settings file (there is also an option to use Azure AD, but I didn’t)
1. Open a Powershell window.
2. run the following command “Get-AzurePublishSettingsFile” (without quotes)
3. You will be prompted to log into your Azure Subscription. When you’ve logged in, you will be taken to a page where your subscription file is generated. Download it somewhere (I chose desktop).

For the next steps I am assuming that you named your subscription file “azuresubscriptioncredentials.publishsettings”. You can name it whatever you want, but you’ll have to put in the correct filename.

Import your Publish Settings file
1. In the same Powershell window (or a new one if you closed it), run the following command “Import-AzurePublishSettingsFile azuresubscriptioncredentials.publishsettings” (without quotes)
2. To verify installation, run the following command “Get-AzureSubscription” and you should see a page of details including your Certificate and Subscription ID.

Now, run the script. It will take a while, so don’t be impatient. =)

Code:
# Import the necessary powershell module
Import-Module "C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Azure.psd1"

function CreateEndPoint($portNumber, $endpointPrefix, $serverName)
{
  Write-Host 'Creating Azure Endpoint:' $endpointPrefix$portNumber
  Get-AzureVM -ServiceName $servername -Name $servername | Add-AzureEndpoint -LocalPort $portNumber -PublicPort $portNumber -Name $endpointNamePrefix+$portNumber -Protocol UDP | Update-AzureVM;
}

# Get your subscription
$sub = Get-AzureSubscription

# Set the subscription.  If you don't do this, you can't run any of the Azure Powershell scripts.
Set-AzureSubscription -SubscriptionName $sub.SubscriptionName -SubscriptionId $sub.SubscriptionId -Certificate $sub.Certificate

# Your server's name.
$servername = $env:COMPUTERNAME

# The endpoint prefix to help us identify why the endpoint exists
$endpointNamePrefix = "Emu"

# Singles
$singlePorts = @(5998,5999,9000)

foreach ($port in $singlePorts)
{
  CreateEndPoint $port $endpointNamePrefix $servername
}

# Create the 7000 - 7100 range
for ($i = 7000; $i -le 7100; $i++)
{
  CreateEndPoint $i $endpointNamePrefix $servername
}
Reply With Quote
  #9  
Old 08-28-2014, 11:42 AM
vsab's Avatar
vsab
Discordant
 
Join Date: Apr 2014
Location: United Kingdom
Posts: 276
Default

I've added this guide to the wiki as it works perfectly. However, expect it to eat up your credit every month!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:25 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3