Ciena Corp. (NYSE: CIEN) is buying Cyan Inc. (NYSE: CYNI) for about $400 million.

Cyan, headquartered in Petaluma, California, develops software that can be scaled into networks to businesses, governments and data centers.  

The Hanover, Maryland-based buyer is a network specialist that creates infrastructure and related software used by the telecommunications industry. 

Under the terms of the deal, Cyan shareholders will receive 0.224 shares of Ciena common stock, or about $4.75 per share. The target's shares closed at $3.65 before the deal was announced. Additionally, Cienna will assume Cyan's $50 million in outstanding 8 percent convertible senior secured notes due 2019. The deal is expected to close in the fourth quarter.

Morgan Stanley & Co LLC advised Ciena, and Hogan Lovells provided legal advice. Jefferies LLC was Cyan's financial adviser, and Wilson Sonsini Goodrich & Rosati acted as legal counsel.

There have been several software related deals recently, spurred by movement to the cloud. In April, NetSuite Inc. (NYSE: N) agreed to buy e-commerce software business Bronto Software Inc. for $200 million. Also in April, IBM Corp. (NYSE: IBM) acquired software company Explorys.

For more on deals in the software sector, see Thoma Bravo & Others Bet Big on the Cloud and Plugging Into Software. Dealmakers are expecting more M&A activity in the technology, media and telecommunications sector, according to our Mid-Market Pulse index.