Hewlett-Packard Co. has reached an agreement to buy Massachusetts-based 3Com. HP, based in Palo Alto, Calif., will pay about $2.7 billion—about $7.90 per share—for 3Com’s stock. That represents a 39 percent premium above 3Com’s closing share price on the day the deal was announced.

3Com, a networking equipment manufacturer, has about $1.3 billion in annual revenues. It is a market leader in China, which reportedly was a key factor in HP’s decision to make the buy. HP had $118 billion in revenues last year.